diff options
author | Martin Polden <mpolden@mpolden.no> | 2021-09-13 10:21:53 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2021-09-13 13:49:05 +0200 |
commit | 911e900129276034d959afa859d0b3af2ae3bacb (patch) | |
tree | 7ab3c5f0fd11814e03c795c110e115bf2f3a2b3f /client/go/Makefile | |
parent | e2b865ea5d9d7fe19143d7419a6bcc06be211ee2 (diff) |
Add homebrew release target
Diffstat (limited to 'client/go/Makefile')
-rw-r--r-- | client/go/Makefile | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/client/go/Makefile b/client/go/Makefile index 452dc710a0d..c827cc19f56 100644 --- a/client/go/Makefile +++ b/client/go/Makefile @@ -1,15 +1,27 @@ # Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -BIN ?= $(CURDIR)/bin -SHARE ?= $(CURDIR)/share # When building a new release the build system should set the VERSION -# environment variable to version being built +# environment variable to version being built or released VERSION ?= $(shell echo "0.0.0-`git rev-parse --short HEAD`") + +BIN ?= $(CURDIR)/bin +SHARE ?= $(CURDIR)/share GO_FLAGS := -ldflags "-X github.com/vespa-engine/vespa/client/go/build.Version=$(VERSION)" all: test checkfmt install +# +# Dist targets +# + +# Bump the version of the vespa-cli formula and create a pull request to Homebrew repository +dist-homebrew: + brew bump-formula-pr --tag vespa-$(VERSION)-1 --version $(VERSION) vespa-cli + +# # Cross-platform build targets +# + build-mac: GOOS=darwin build-mac: xbuild @@ -23,14 +35,17 @@ xbuild: mkdir -p bin/$(GOOS)_amd64 env GOOS=$(GOOS) go build -o bin/$(GOOS)_amd64 $(GO_FLAGS) ./... -manpages: install - mkdir -p $(SHARE)/man/man1 - $(BIN)/vespa man $(SHARE)/man/man1 - +# # Development targets +# + install: env GOBIN=$(BIN) go install $(GO_FLAGS) ./... +manpages: install + mkdir -p $(SHARE)/man/man1 + $(BIN)/vespa man $(SHARE)/man/man1 + clean: rm -rf $(BIN) $(SHARE) |