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

kvn pushed a commit to branch v0.2.0
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git


The following commit(s) were added to refs/heads/v0.2.0 by this push:
     new 2030910  chore: add release-src makefile
2030910 is described below

commit 20309104599da9139c686dd0b15be74ed81585dc
Author: kv <[email protected]>
AuthorDate: Sat Jan 9 22:41:22 2021 +0800

    chore: add release-src makefile
---
 .gitignore |  1 +
 Makefile   | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/.gitignore b/.gitignore
index 384d362..61ba3f1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@
 
 # Output of the go coverage tool, specifically when used with LiteIDE
 *.out
+release
 
 .idea
 .DS_Store
diff --git a/Makefile b/Makefile
index eaab1da..3038504 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,7 @@
 default: help
 
 VERSION ?= 0.2.0
+RELEASE_SRC = apache-apisix-ingress-${VERSION}-src
 IMAGE_TAG ?= "latest"
 GITSHA ?= $(shell git rev-parse --short=7 HEAD)
 OSNAME ?= $(shell uname -s | tr A-Z a-z)
@@ -76,4 +77,27 @@ help:
        @echo
        @grep -E '^### [-A-Za-z0-9_]+:' Makefile | sed 's/###/   /'
 
+### release-src:      Release source
+release-src:
+       tar -zcvf $(RELEASE_SRC).tgz \
+       --exclude .github \
+       --exclude .git \
+       --exclude .idea \
+       --exclude .gitignore \
+       --exclude .DS_Store \
+       --exclude docs \
+       --exclude samples \
+       --exclude test \
+       --exclude release \
+       --exclude $(RELEASE_SRC).tgz \
+       .
+
+       gpg --batch --yes --armor --detach-sig $(RELEASE_SRC).tgz
+       shasum -a 512 $(RELEASE_SRC).tgz > $(RELEASE_SRC).tgz.sha512
+
+       mkdir -p release
+       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: build lint help

Reply via email to