You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2023/05/17 15:48:51 UTC

[skywalking-grafana-plugins] branch main updated: build(release): update Makefile (#14)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-grafana-plugins.git


The following commit(s) were added to refs/heads/main by this push:
     new 17a02d3  build(release): update Makefile (#14)
17a02d3 is described below

commit 17a02d3b974142bb1e43a85e689651a9634aaeba
Author: Fine0830 <fa...@gmail.com>
AuthorDate: Wed May 17 23:48:46 2023 +0800

    build(release): update Makefile (#14)
---
 .DS_Store  | Bin 6148 -> 0 bytes
 .gitignore |   2 ++
 Makefile   |  31 ++++++++++++++++++++++---------
 release.md |   2 ++
 4 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/.DS_Store b/.DS_Store
deleted file mode 100644
index 47497f0..0000000
Binary files a/.DS_Store and /dev/null differ
diff --git a/.gitignore b/.gitignore
index ae4f940..0754831 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,6 +40,7 @@ coverage
 # Compiled binary addons (https://nodejs.org/api/addons.html)
 dist/
 release/
+release-dist/
 artifacts/
 work/
 ci/
@@ -49,5 +50,6 @@ e2e-results/
 
 # 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 @@ SHELL := /bin/bash -o pipefail
 
 VERSION ?= latest
 RELEASE_SRC = skywalking-grafana-plugins-${VERSION}-src
+RELEASE_DIST = skywalking-datasource-${VERSION}
 
 GPG_UID :=
 
@@ -27,7 +28,7 @@ endif
 
 .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 @@ release-src:
 	--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 @@ SkyWalking Resources:
   ```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`.