Skip to content

Commit

Permalink
Merge pull request #806 from macedogm/v2.8-vex-go-build-improvements
Browse files Browse the repository at this point in the history
[v2.8] VEX related improvements in the build process
  • Loading branch information
yiannistri authored Jan 9, 2025
2 parents 045b8e1 + 9813350 commit 43b98ae
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ $(SETUP_ENVTEST):

.PHONY: operator
operator:
CGO_ENABLED=0 go build -o bin/aks-operator main.go
CGO_ENABLED=0 go build -ldflags \
"-X github.com/rancher/aks-operator/pkg/version.GitCommit=$(GIT_COMMIT) \
-X github.com/rancher/aks-operator/pkg/version.Version=$(TAG)" \
-o bin/aks-operator .

.PHONY: generate-go
generate-go: $(MOCKGEN)
Expand Down Expand Up @@ -132,7 +135,7 @@ buildx-machine:
.PHONY: image-build
image-build: buildx-machine ## build (and load) the container image targeting the current platform.
docker buildx build -f package/Dockerfile \
--builder $(MACHINE) --build-arg VERSION=$(TAG) \
--builder $(MACHINE) --build-arg COMMIT=$(GIT_COMMIT) --build-arg VERSION=$(TAG) \
-t "$(IMAGE)" $(BUILD_ACTION) .
@echo "Built $(IMAGE)"

Expand Down Expand Up @@ -181,4 +184,4 @@ APIDIFF_OLD_COMMIT ?= $(shell git rev-parse origin/release-v2.8)

.PHONY: apidiff
apidiff: $(GO_APIDIFF) ## Check for API differences
$(GO_APIDIFF) $(APIDIFF_OLD_COMMIT) --print-compatible
$(GO_APIDIFF) $(APIDIFF_OLD_COMMIT) --print-compatible

0 comments on commit 43b98ae

Please sign in to comment.