forked from KostaGorod/iredmail-cli
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
22 lines (17 loc) · 773 Bytes
/
Makefile
File metadata and controls
22 lines (17 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
RELEASE_TAG=$$(git describe --abbrev=0 --tags)
dist-tools:
@go get github.com/mitchellh/gox
dist: dist-tools
rm -rf ./bin/*
mkdir -p ./bin/iredmail-cli_linux-amd64_$(RELEASE_TAG)
mkdir -p ./bin/iredmail-cli_linux-arm64_$(RELEASE_TAG)
gox -osarch="linux/amd64" -output=./bin/iredmail-cli_linux-amd64_$(RELEASE_TAG)/iredmail-cli_$(RELEASE_TAG)
gox -osarch="linux/arm64" -output=./bin/iredmail-cli_linux-arm64_$(RELEASE_TAG)/iredmail-cli_$(RELEASE_TAG)
cd bin && ls --color=no | xargs -I {} tar -czf {}.tgz {}
rm -rf ./bin/iredmail-cli_linux-amd64_$(RELEASE_TAG)
rm -rf ./bin/iredmail-cli_linux-arm64_$(RELEASE_TAG)
release-tools:
@go get github.com/tcnksm/ghr
release: release-tools
ghr $(RELEASE_TAG) ./bin/
.PHONY: all dist-tools dist release-tools release