diff --git a/Makefile b/Makefile index 19026dbd5c..be76290ac7 100644 --- a/Makefile +++ b/Makefile @@ -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)