refactor: define TARGETARCH once in common.mk

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

View File

@@ -1,7 +1,6 @@
DOKKU_VERSION ?= master
TARGETARCH ?= $(HOST_ARCH)
GOARCH ?= $(TARGETARCH)
include common.mk
DOCKER_IMAGE_LABELER_URL ?= $(shell jq -r --arg name docker-image-labeler --arg arch $(TARGETARCH) '.dependencies[] | select(.name == $$name) | .urls[$$arch]' contrib/dependencies.json)
DOCKER_CONTAINER_HEALTHCHECKER_URL ?= $(shell jq -r --arg name docker-container-healthchecker --arg arch $(TARGETARCH) '.dependencies[] | select(.name == $$name) | .urls[$$arch]' contrib/dependencies.json)
@@ -32,8 +31,6 @@ else
BUILD_STACK_TARGETS = build-in-docker
endif
include common.mk
.PHONY: all apt-update install version copyfiles copyplugin man-db plugins dependencies docker-image-labeler lambda-builder netrc sshcommand procfile-util plugn docker aufs stack count vagrant-acl-add vagrant-dokku go-build wget
include docs.mk

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