Skip to content

Commit f6ea023

Browse files
authored
feat(Makefile): update release-src (#816)
1 parent 59515b5 commit f6ea023

File tree

3 files changed

+25
-17
lines changed

3 files changed

+25
-17
lines changed

Makefile

+25-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ UNAME ?= $(shell uname)
2020
YARN_EXEC ?= $(shell which yarn)
2121
GO_EXEC ?= $(shell which go)
2222

23+
VERSION ?= latest
24+
RELEASE_SRC = apache-apisix-dashboard-${VERSION}-src
25+
2326
export GO111MODULE=on
2427

2528
### help: Show Makefile rules
@@ -91,5 +94,26 @@ endif
9194

9295
.PHONY: release-src
9396
release-src:
94-
tar –cf dashboard.tar ./output/*
97+
git clean -Xdf
98+
tar -zcvf $(RELEASE_SRC).tgz \
99+
--exclude .github \
100+
--exclude .git \
101+
--exclude .gitattributes \
102+
--exclude .idea \
103+
--exclude .vscode \
104+
--exclude .gitignore \
105+
--exclude .DS_Store \
106+
--exclude docs \
107+
--exclude release \
108+
--exclude api/internal/core/store/validate_mock.go \
109+
--exclude api/internal/core/storage/storage_mock.go \
110+
.
111+
112+
gpg --batch --yes --armor --detach-sig $(RELEASE_SRC).tgz
113+
shasum -a 512 $(RELEASE_SRC).tgz > $(RELEASE_SRC).tgz.sha512
114+
115+
mkdir -p release
116+
mv $(RELEASE_SRC).tgz release/$(RELEASE_SRC).tgz
117+
mv $(RELEASE_SRC).tgz.asc release/$(RELEASE_SRC).tgz.asc
118+
mv $(RELEASE_SRC).tgz.sha512 release/$(RELEASE_SRC).tgz.sha512
95119

docs/deploy.md

-8
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,3 @@ $ ./manager-api &
8585
```sh
8686
$ kill $(ps aux | grep 'manager-api' | awk '{print $2}')
8787
```
88-
89-
## Other
90-
91-
1. If necessary, using the following command after the build is complete will pack the `output` directory so that you can move the build to another location.
92-
93-
```sh
94-
$ make release-src
95-
```

docs/deploy.zh-CN.md

-8
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,3 @@ $ ./manager-api &
8484
```sh
8585
$ kill $(ps aux | grep 'manager-api' | awk '{print $2}')
8686
```
87-
88-
## 其它
89-
90-
1. 如有需要,在构建完成后使用如下命令,将会对 `output` 目录进行打包操作,以便您将构建结果移动到其它位置。
91-
92-
```sh
93-
$ make release-src
94-
```

0 commit comments

Comments
 (0)