refactor: define TARGETARCH once in common.mk
This commit is contained in:
2 files changed
+5
-6
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user