Skip to content

Commit

Permalink
Add chamber-$(VERSION).sha256sums generation (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickatsegment committed Sep 5, 2018
1 parent d76fdd1 commit e743d3b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,27 @@ release: gh-release clean dist
--name chamber-$(VERSION)-linux-amd64 \
--file dist/chamber-$(VERSION)-linux-amd64

github-release upload \
--security-token $$GH_LOGIN \
--user segmentio \
--repo chamber \
--tag $(VERSION) \
--name chamber-$(VERSION).sha256sums \
--file dist/chamber-$(VERSION).sha256sums

clean:
rm -rf ./dist

dist:
mkdir dist
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build $(LDFLAGS) -o dist/chamber-$(VERSION)-darwin-amd64
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build $(LDFLAGS) -o dist/chamber-$(VERSION)-linux-amd64
@which sha256sum 2>&1 > /dev/null || ( \
echo 'missing sha256sum; install on MacOS with `brew install coreutils && ln -s $$(which gsha256sum) /usr/local/bin/sha256sum`' ; \
exit 1; \
)
cd dist && \
sha256sum chamber-$(VERSION)-* > chamber-$(VERSION).sha256sums

gh-release:
go get -u github.com/aktau/github-release
Expand Down

0 comments on commit e743d3b

Please sign in to comment.