-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
21 lines (17 loc) · 979 Bytes
/
Makefile
File metadata and controls
21 lines (17 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
OWNER = lnmpy
REPO = http-server
TAG = v$(shell grep -o -P '\d+.\d+.\d+' version.go)
build: clean
GO111MODULE=on go build -o http-server
release: clean
GOOS=darwin GOARCH=amd64 go build -o http-server && tar -czf http-server_darwin.tar.gz http-server
GOOS=linux GOARCH=amd64 go build -o http-server && tar -czf http-server_linux.tar.gz http-server
GOOS=windows GOARCH=amd64 go build -o http-server.exe && tar -czf http-server_windows.tar.gz http-server.exe
-github-release delete -u ${OWNER} -r ${REPO} -t ${TAG}
github-release release -u ${OWNER} -r ${REPO} -t ${TAG} -n ${TAG}
-sleep 20
github-release upload -u ${OWNER} -r ${REPO} -t ${TAG} -n "http-server_darwin.tar.gz" -f http-server_darwin.tar.gz
github-release upload -u ${OWNER} -r ${REPO} -t ${TAG} -n "http-server_linux.tar.gz" -f http-server_linux.tar.gz
github-release upload -u ${OWNER} -r ${REPO} -t ${TAG} -n "http-server_windows.tar.gz" -f http-server_windows.tar.gz
clean:
rm -f http-server*