File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ BUILD_VERSION := $(version )
2+ BUILD_TIME := $(shell date "+% F % T")
3+ COMMIT_SHA1 := $(shell git rev-parse HEAD)
4+
5+ all :
6+ gox -osarch=" darwin/amd64 linux/386 linux/amd64" \
7+ -output ="dist/{{.Dir}}_{{.OS}}_{{.Arch}}" \
8+ -ldflags "-X 'github.com/mritd/gitflow-toolkit/cmd.Version=${BUILD_VERSION}' \
9+ -X 'github.com/mritd/gitflow-toolkit/cmd.BuildTime=${BUILD_TIME}' \
10+ -X 'github.com/mritd/gitflow-toolkit/cmd.CommitID=${COMMIT_SHA1}'"
11+
12+ release : all
13+ ghr -u mritd -t $(GITHUB_RELEASE_TOKEN ) -replace -recreate --debug $(version ) dist
14+
15+ clean :
16+ rm -rf dist
17+
18+ install :
19+ go install -ldflags " -X 'github.com/mritd/gitflow-toolkit/cmd.Version=${BUILD_VERSION} ' \
20+ -X 'github.com/mritd/gitflow-toolkit/cmd.BuildTime=${BUILD_TIME}' \
21+ -X 'github.com/mritd/gitflow-toolkit/cmd.CommitID=${COMMIT_SHA1}'"
22+
23+ .PHONY : all release clean install
24+
25+ .EXPORT_ALL_VARIABLES :
26+
27+ GO111MODULE = on
You can’t perform that action at this time.
0 commit comments