diff --git a/Makefile b/Makefile index 83e831676a..775bbcaeef 100644 --- a/Makefile +++ b/Makefile @@ -314,7 +314,7 @@ VERSION ?= $(shell git describe --exact-match 2> /dev/null || \ git describe --match=$(git rev-parse --short=8 HEAD) --always --dirty --abbrev=8) image: - TAG=$(VERSION) REGISTRY=$(REGISTRY) $(ROOT_DIR)/scripts/docker_push.sh $(filter-out $@,$(MAKECMDGOALS)) + DEBUG=$(DEBUG) ARCH=$(ARCH) TAG=$(VERSION) REGISTRY=$(REGISTRY) $(ROOT_DIR)/scripts/docker_push.sh $(filter-out $@,$(MAKECMDGOALS)) .PHONY: image diff --git a/scripts/docker_push.sh b/scripts/docker_push.sh index a44f5e2629..6a0d1934b8 100755 --- a/scripts/docker_push.sh +++ b/scripts/docker_push.sh @@ -3,6 +3,10 @@ set -o errexit set -o pipefail +if [ "$DEBUG" == "true" ]; then + set -ex ;export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' +fi + readlink_mac() { cd `dirname $1` TARGET_FILE=`basename $1` @@ -83,6 +87,7 @@ buildx_and_push() { local path=$3 local arch=$4 docker buildx build -t "$tag" --platform "linux/$arch" -f "$2" "$3" --push + docker pull "$tag" } push_image() {