File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed
Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -25,3 +25,5 @@ _testmain.go
2525* .prof
2626
2727# Created by .ignore support plugin (hsz.mobi)
28+
29+ release /elastic-etcd
Original file line number Diff line number Diff line change 33
44RUN apk add -U ca-certificates && rm -rf /var/cache/apk/*
55
6- COPY elastic-etcd /elastic-etcd
6+ COPY release/ elastic-etcd /elastic-etcd
77
88CMD ["/elastic-etcd" , "--help" ]
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ SHELL=/bin/bash
22CMD =elastic-etcd
33GOBUILD =go build
44REPOSITORY =sttts
5+ VERSION =$(shell git describe --always --tags --dirty)
56
67default : all
78
@@ -38,13 +39,18 @@ check: gofmt gometalinter
3839clean :
3940 rm -f $(CMD ) docker/elastic-etcd
4041
41- .PHONY : docker/elastic-etcd
42- docker/elastic-etcd :
43- cd docker && GOOS=linux go build github.com/sttts/elastic-etcd/cmd/elastic-etcd
42+ .PHONY : release/elastic-etcd
43+ release/elastic-etcd :
44+ mkdir -p release
45+ cd release && GOOS=linux go build github.com/sttts/elastic-etcd/cmd/elastic-etcd
46+ .PHONY : release
47+ release : release/elastic-etcd
48+ go get github.com/aktau/github-release
49+ github-release upload -u sttts --repo elastic-etcd --tag $(VERSION ) --file release/elastic-etcd --name elastic-etcd
4450
4551.PHONY : docker
46- docker : docker /elastic-etcd
47- docker build -t $(REPOSITORY ) /elastic-etcd docker
52+ docker : release /elastic-etcd
53+ docker build -t $(REPOSITORY ) /elastic-etcd .
4854
4955push : docker
5056 docker push $(REPOSITORY ) /elastic-etcd
You can’t perform that action at this time.
0 commit comments