Skip to content

Commit

Permalink
Merge pull request #153 from ncdc/make-release
Browse files Browse the repository at this point in the history
Add 'make release'
  • Loading branch information
skriss authored Oct 26, 2017
2 parents a3302d3 + 81d4788 commit 0c13ef0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,29 @@ endif
update: fmt
@$(MAKE) shell CMD="-c 'hack/update-all.sh'"

release: all-tar-bin checksum

checksum:
@cd _output/release; \
sha256sum *.tar.gz > CHECKSUM; \
cat CHECKSUM; \
sha256sum CHECKSUM

all-tar-bin: $(addprefix tar-bin-, $(CLI_PLATFORMS))

tar-bin-%:
@$(MAKE) ARCH=$* tar-bin

tar-bin: build
mkdir -p _output/release

# We do the subshell & wildcard ls so we can pick up $(BIN).exe for windows
(cd _output/bin/$(GOOS)/$(GOARCH) && ls $(BIN)*) | \
tar \
-C _output/bin/$(GOOS)/$(GOARCH) \
--files-from=- \
-zcf _output/release/$(BIN)-$(GOOS)-$(GOARCH).tar.gz

build-dirs:
@mkdir -p _output/bin/$(GOOS)/$(GOARCH)
@mkdir -p .go/src/$(PKG) .go/pkg .go/bin .go/std/$(GOOS)/$(GOARCH)
Expand Down

0 comments on commit 0c13ef0

Please sign in to comment.