Skip to content

Commit

Permalink
Release fixes - static build and version in binary
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-szabo committed Apr 14, 2019
1 parent 62a34d9 commit 02547a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .circleci/release.bash
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if [[ ! -f "build/${binary}" ]]; then
echo "${binary} does not exist."
continue
fi
curl -s -S -X POST -u "${GITHUB_USERNAME}:${GITHUB_TOKEN}" "https://uploads.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/releases/${id}/assets?name=${binary}" --user-agent releasebot -H "Accept: application/vnd.github.v3.raw+json" -H "Content-Type: application/octet-stream" -H "Content-Encoding: utf8" --data-binary "@build/${binary}" > upload.json
curl -s -S -X POST -u "${GITHUB_USERNAME}:${GITHUB_TOKEN}" "https://uploads.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/releases/${id}/assets?name=${binary}_${CIRCLE_TAG}_linux_amd64" --user-agent releasebot -H "Accept: application/vnd.github.v3.raw+json" -H "Content-Type: application/octet-stream" -H "Content-Encoding: utf8" --data-binary "@build/${binary}" > upload.json
ERR=$?
if [[ $ERR -ne 0 ]]; then
echo "ERROR: curl error, exitcode $ERR."
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ GOPATH ?= $(shell go env GOPATH)
.PHONY: build test lint package

build:
GO111MODULE=on go build -o $(OUTPUTDIR)/delegation cmd/delegation/main.go
GO111MODULE=on go build -o $(OUTPUTDIR)/stake-dist cmd/stake-dist/main.go
GO111MODULE=on CGO_ENABLED=0 go build -ldflags "-extldflags static" -o $(OUTPUTDIR)/delegation cmd/delegation/main.go
GO111MODULE=on CGO_ENABLED=0 go build -ldflags "-extldflags static" -o $(OUTPUTDIR)/stake-dist cmd/stake-dist/main.go

test:
GO111MODULE=on go test -cover -race ./...
Expand Down

0 comments on commit 02547a6

Please sign in to comment.