refactor: define TARGETARCH once in common.mk

This commit is contained in:
Jose Diaz-Gonzalez committed 2026-11-06 19:55:44 -05:00
1 parent 825fa8968c
commit 3d4a6b5981
2 files changed
+5 -6

No files matched your search

+4 -2
View File
@@ -5,8 +5,10 @@ BUILD_IMAGE := golang:1.27.1
GO_BUILD_CACHE ?= /tmp/dokku-go-build-cache
GO_MOD_CACHE ?= /tmp/dokku-go-mod-mod
GO_ROOT_MOUNT ?= $$PWD/../..:$(GO_REPO_ROOT)
HOST_ARCH := $(shell dpkg --print-architecture 2>/dev/null || uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')
GOARCH ?= $(HOST_ARCH)
ifndef TARGETARCH
TARGETARCH := $(shell dpkg --print-architecture 2>/dev/null || uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')
endif
GOARCH ?= $(TARGETARCH)
.PHONY: build-in-docker build clean src-clean