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

kezhenxu94 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-cli.git


The following commit(s) were added to refs/heads/master by this push:
     new 798e84e  Add release script (#19)
798e84e is described below

commit 798e84e42983cf52adde4eed7c6aa16b12a4eca3
Author: kezhenxu94 <kezhenx...@apache.org>
AuthorDate: Tue Dec 3 21:21:37 2019 +0800

    Add release script (#19)
---
 Makefile | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index a8ad5c4..c1afb90 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,9 @@ VERSION ?= latest
 OUT_DIR = bin
 BINARY = swctl
 
+RELEASE_BIN = skywalking-cli-$(VERSION)-bin
+RELEASE_SRC = skywalking-cli-$(VERSION)-src
+
 OS = $(shell uname)
 
 GO = go
@@ -79,5 +82,29 @@ coverage: test
 .PHONY: clean
 clean:
        $(GO_CLEAN) ./...
-       -rm -rf ./bin
+       -rm -rf bin
        -rm -rf coverage.txt
+       -rm -rf *.tgz
+       -rm -rf *.tgz
+       -rm -rf *.asc
+       -rm -rf *.sha512
+
+release-src: clean
+       -tar -zcvf $(RELEASE_SRC).tgz \
+       --exclude bin \
+       --exclude .git \
+       --exclude .idea \
+       --exclude .DS_Store \
+       --exclude .github \
+       --exclude $(RELEASE_SRC).tgz \
+       .
+
+release-bin: build
+       -mkdir $(RELEASE_BIN)
+       -cp -R bin $(RELEASE_BIN)
+       -tar -zcvf $(RELEASE_BIN).tgz $(RELEASE_BIN)
+       -rm -rf $(RELEASE_BIN)
+
+release: verify license release-src release-bin
+       gpg --batch --yes --armor --detach-sig $(RELEASE_SRC).tgz
+       shasum -a 512 $(RELEASE_SRC).tgz > $(RELEASE_SRC).tgz.sha512
\ No newline at end of file

Reply via email to