File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ GO := go
2929
3030GOTEST_VERBOSE ?= -v
3131
32+ # Allow turning off go's vcs build
33+ BUILDVCS ?= true
34+
3235# Directories
3336TOOLS_DIR := $(abspath $(ROOT_DIR ) /hack/tools)
3437TOOLS_BIN_DIR := $(TOOLS_DIR ) /bin
@@ -144,9 +147,9 @@ build-cli-%: ##Build the Tanzu Core CLI for a platform
144147 fi
145148
146149 @if [ "$(OS)" = "windows" ]; then \
147- GOOS=$(OS) GOARCH=$(ARCH) $(GO) build -gcflags=all="-l" --ldflags "$(LD_FLAGS)" -o "$(ARTIFACTS_DIR)/$(OS)/$(ARCH)/cli/core/$(BUILD_VERSION)/tanzu-cli-$(OS)_$(ARCH).exe" ./cmd/tanzu/main.go;\
150+ GOOS=$(OS) GOARCH=$(ARCH) $(GO) build -buildvcs=$(BUILDVCS) - gcflags=all="-l" --ldflags "$(LD_FLAGS)" -o "$(ARTIFACTS_DIR)/$(OS)/$(ARCH)/cli/core/$(BUILD_VERSION)/tanzu-cli-$(OS)_$(ARCH).exe" ./cmd/tanzu/main.go;\
148151 else \
149- GOOS=$(OS) GOARCH=$(ARCH) $(GO) build -gcflags=all="-l" --ldflags "$(LD_FLAGS)" -o "$(ARTIFACTS_DIR)/$(OS)/$(ARCH)/cli/core/$(BUILD_VERSION)/tanzu-cli-$(OS)_$(ARCH)" ./cmd/tanzu/main.go;\
152+ GOOS=$(OS) GOARCH=$(ARCH) $(GO) build -buildvcs=$(BUILDVCS) - gcflags=all="-l" --ldflags "$(LD_FLAGS)" -o "$(ARTIFACTS_DIR)/$(OS)/$(ARCH)/cli/core/$(BUILD_VERSION)/tanzu-cli-$(OS)_$(ARCH)" ./cmd/tanzu/main.go;\
150153 fi
151154
152155# # --------------------------------------
@@ -155,7 +158,7 @@ build-cli-%: ##Build the Tanzu Core CLI for a platform
155158
156159.PHONY : prepare-builder
157160prepare-builder : # # Build Tanzu CLI builder plugin
158- cd cmd/plugin/builder && $(GO ) build -o $(ROOT_DIR ) /bin/builder .
161+ cd cmd/plugin/builder && $(GO ) build -buildvcs= $( BUILDVCS ) - o $(ROOT_DIR ) /bin/builder .
159162
160163# # --------------------------------------
161164# # OS Packages
You can’t perform that action at this time.
0 commit comments