build(release): update Makefile (#14)
diff --git a/.DS_Store b/.DS_Store
deleted file mode 100644
index 47497f0..0000000
--- a/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/.gitignore b/.gitignore
index ae4f940..0754831 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,6 +40,7 @@
# Compiled binary addons (https://nodejs.org/api/addons.html)
dist/
release/
+release-dist/
artifacts/
work/
ci/
@@ -49,5 +50,6 @@
# Editor
.idea
+.DS_Store
.eslintcache
\ No newline at end of file
diff --git a/Makefile b/Makefile
index 3033aea..315b0c7 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,7 @@
VERSION ?= latest
RELEASE_SRC = skywalking-grafana-plugins-${VERSION}-src
+RELEASE_DIST = skywalking-datasource-${VERSION}
GPG_UID :=
@@ -27,7 +28,7 @@
.PHONY: release-src
release-src:
- tar -zcvf $(RELEASE_SRC).zip \
+ tar -zcvf $(RELEASE_SRC).tgz \
--exclude .git/ \
--exclude .idea/ \
--exclude .gitignore \
@@ -36,18 +37,30 @@
--exclude lib \
--exclude node_modules \
--exclude release \
- --exclude $(RELEASE_SRC).zip \
+ --exclude $(RELEASE_SRC).tgz \
.
- gpg $(GPG_UID_FLAG) --batch --yes --armor --detach-sig $(RELEASE_SRC).zip
- shasum -a 1 $(RELEASE_SRC).zip > $(RELEASE_SRC).zip.sha1
- shasum -a 512 $(RELEASE_SRC).zip > $(RELEASE_SRC).zip.sha512
+ gpg $(GPG_UID_FLAG) --batch --yes --armor --detach-sig $(RELEASE_SRC).tgz
+ shasum -a 512 $(RELEASE_SRC).tgz > $(RELEASE_SRC).tgz.sha512
mkdir -p release
- mv $(RELEASE_SRC).zip release/$(RELEASE_SRC).zip
- mv $(RELEASE_SRC).zip.asc release/$(RELEASE_SRC).zip.asc
- mv $(RELEASE_SRC).zip.sha1 release/$(RELEASE_SRC).zip.sha1
- mv $(RELEASE_SRC).zip.sha512 release/$(RELEASE_SRC).zip.sha512
+ mv $(RELEASE_SRC).tgz release/$(RELEASE_SRC).tgz
+ mv $(RELEASE_SRC).tgz.asc release/$(RELEASE_SRC).tgz.asc
+ mv $(RELEASE_SRC).tgz.sha512 release/$(RELEASE_SRC).tgz.sha512
+
+.PHONY: release-dist
+release-dist:
+ mv dist/ skywalking-datasource
+ zip $(RELEASE_DIST).zip skywalking-datasource -r
+ rm -rf skywalking-datasource
+
+ gpg $(GPG_UID_FLAG) --batch --yes --armor --detach-sig $(RELEASE_DIST).zip
+ shasum -a 1 $(RELEASE_DIST).zip > $(RELEASE_DIST).zip.sha1
+
+ mkdir -p release-dist
+ mv $(RELEASE_DIST).zip release-dist/$(RELEASE_DIST).zip
+ mv $(RELEASE_DIST).zip.asc release-dist/$(RELEASE_DIST).zip.asc
+ mv $(RELEASE_DIST).zip.sha1 release-dist/$(RELEASE_DIST).zip.sha1
.PHONY: install
install:
diff --git a/release.md b/release.md
index c99708b..f1911d3 100644
--- a/release.md
+++ b/release.md
@@ -149,6 +149,8 @@
```bash
> yarn install --pure-lockfile
> yarn build
+ > export VERSION=x.y.z
+ > make release-dist
```
2. [Sign in](https://grafana.com/auth/sign-in) to Grafana Cloud account,the username is `wusheng@apache.org` and the password has been sent to `private@skwalking.apache.org`.