Skip to content

Commit 443fc94

Browse files
authored
Merge pull request #250 from SgtCoDFish/localarch
Better handling of local arch differences
2 parents 5b960b2 + 1813050 commit 443fc94

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ CONTAINER_REGISTRY_API_URL ?= https://quay.io/v2/jetstack/cert-manager-package-d
4545

4646
GOPROXY ?= https://proxy.golang.org,direct
4747

48+
GO_SOURCES := $(shell find . -name "*.go") go.mod go.sum
49+
4850
CI ?=
4951

5052
# can't use a comma in an argument to a make function, so define a variable instead
@@ -94,7 +96,9 @@ vet:
9496
go vet ./...
9597

9698
.PHONY: build
97-
build: | $(BINDIR) ## build trust-manager
99+
build: $(BINDIR)/trust-manager | $(BINDIR) ## build trust-manager for the host system architecture
100+
101+
$(BINDIR)/trust-manager: $(GO_SOURCES) | $(BINDIR)
98102
CGO_ENABLED=0 go build -o $(BINDIR)/trust-manager ./cmd/trust-manager
99103

100104
.PHONY: generate

make/trust-manager-build.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ trust-manager-save:
2828

2929
.PHONY: trust-manager-load
3030
trust-manager-load:
31-
$(call build_trust_manager,type=docker,latest,linux/amd64)
31+
$(call build_trust_manager,type=docker,latest,linux/$(ARCH))
3232

3333
.PHONY: trust-manager-push
3434
trust-manager-push:

make/trust-package-debian.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ endif
3737

3838
.PHONY: trust-package-debian-load
3939
trust-package-debian-load:
40-
$(call build_debian_trust_package,type=docker,latest,linux/amd64)
40+
$(call build_debian_trust_package,type=docker,latest,linux/$(ARCH))
4141

4242
.PHONY: trust-package-debian-push
4343
trust-package-debian-push:

0 commit comments

Comments
 (0)