0
0
mirror of https://github.com/thegeeklab/wp-docker-buildx.git synced 2024-11-22 10:10:39 +00:00

add goarm handling in makefile (#176)

This commit is contained in:
Robert Kaussow 2023-01-14 15:19:47 +01:00 committed by GitHub
parent 3327233207
commit 6695e6b625
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -37,5 +37,4 @@ RUN apk --update add --virtual .build-deps curl && \
rm -rf /tmp/*
COPY --from=build /src/dist/drone-docker-buildx /bin/drone-docker-buildx
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "drone-docker-buildx"]

View File

@ -24,6 +24,9 @@ XGO_TARGETS ?= linux/amd64,linux/arm64
TARGETOS ?= linux
TARGETARCH ?= amd64
ifneq ("$(TARGETVARIANT)","")
GOARM ?= $(subst v,,$(TARGETVARIANT))
endif
TAGS ?= netgo
ifndef VERSION
@ -71,7 +74,7 @@ test:
build: $(DIST)/$(EXECUTABLE)
$(DIST)/$(EXECUTABLE): $(SOURCES)
GOOS=${TARGETOS} GOARCH=${TARGETARCH} $(GO) build -v -tags '$(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -o $@ ./cmd/$(EXECUTABLE)
GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOARM=$(GOARM) $(GO) build -v -tags '$(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -o $@ ./cmd/$(EXECUTABLE)
$(DIST_DIRS):
mkdir -p $(DIST_DIRS)