-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update versions information in HostAgent binary (#454)
* Update versions information in HostAgent binary * Minor lint fixes * Change to a dummy git sha Signed-off-by: Anusha Hegde <[email protected]> * Removing duplicate test Signed-off-by: Sachin Singh <[email protected]> * New integration test for version For the new test, we match the script generated values and locally created git values. * Test fix: length of gitVars slice * Test fix: expected and generated outputs * Test fix: Use gitVersion instead gitTreeState * Test and minor lint fixes * Test refactoring and cleaning up Co-authored-by: Anusha Hegde <[email protected]> Co-authored-by: Sachin Singh <[email protected]> Co-authored-by: Anusha Hegde <[email protected]>
- Loading branch information
1 parent
e66491f
commit b17b4f0
Showing
8 changed files
with
199 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,9 +33,8 @@ GINKGO := $(TOOLS_BIN_DIR)/ginkgo | |
|
||
BYOH_TEMPLATES := $(REPO_ROOT)/test/e2e/data/infrastructure-provider-byoh | ||
|
||
LDFLAGS=-w -s | ||
LDFLAGS := -w -s $(shell hack/version.sh) | ||
STATIC=-extldflags '-static' | ||
AGENT_BINARY_VERSION ?= dev | ||
|
||
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) | ||
ifeq (,$(shell go env GOBIN)) | ||
|
@@ -201,9 +200,7 @@ kustomize: ## Download kustomize locally if necessary. | |
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected]) | ||
|
||
host-agent-binaries: ## Builds the binaries for the host-agent | ||
RELEASE_BINARY=./byoh-hostagent GOOS=linux GOARCH=amd64 GOLDFLAGS="$(LDFLAGS) $(STATIC) \ | ||
-X 'github.com/vmware-tanzu/cluster-api-provider-bringyourownhost/agent/version.Version=${AGENT_BINARY_VERSION}' \ | ||
-X 'github.com/vmware-tanzu/cluster-api-provider-bringyourownhost/agent/version.BuildDate=$(shell date -u +\"%Y-%m-%dT%H:%M:%SZ\")'" \ | ||
RELEASE_BINARY=./byoh-hostagent GOOS=linux GOARCH=amd64 GOLDFLAGS="$(LDFLAGS) $(STATIC)" \ | ||
HOST_AGENT_DIR=./$(HOST_AGENT_DIR) $(MAKE) host-agent-binary | ||
|
||
host-agent-binary: $(RELEASE_DIR) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.