Skip to content

Commit

Permalink
CirceCI
Browse files Browse the repository at this point in the history
  • Loading branch information
bugficks committed Jul 11, 2020
1 parent 7602e67 commit 41c6200
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 1 addition & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,4 @@ jobs:
- run: make release
- run:
name: "Publish Release on GitHub"
command: |
go get github.com/tcnksm/ghr
TAG=$(git describe --tags)
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${TAG} ./release/
command: make github_release
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.SILENT :
.PHONY : docker-gen dist dist-clean release check-gofmt test

TAG:=`git describe --tags`
TAG:=$(shell git describe --tags)
LDFLAGS:=-X main.buildVersion=$(TAG)
# https://stackoverflow.com/a/58185179
LDFLAGS_EXTRA=-linkmode external -w -extldflags "-static"
Expand Down Expand Up @@ -53,3 +53,10 @@ check-gofmt:

test:
go test ./...

github_release: SHELL=/bin/bash
github_release:
if [[ ${TAG} =~ ^[0-9]+\.[0-9]+\.[0-9]+$$ ]]; then \
go get github.com/tcnksm/ghr; \
ghr -t $${GITHUB_TOKEN} -u $${CIRCLE_PROJECT_USERNAME} -r $${CIRCLE_PROJECT_REPONAME} -c $${CIRCLE_SHA1} -delete ${TAG} ./release/; \
fi;

0 comments on commit 41c6200

Please sign in to comment.