mirror of
https://github.com/thegeeklab/wp-docker-buildx.git
synced 2024-11-25 09:10:39 +00:00
add goarm handling in makefile (#176)
This commit is contained in:
parent
3327233207
commit
6695e6b625
@ -37,5 +37,4 @@ RUN apk --update add --virtual .build-deps curl && \
|
|||||||
rm -rf /tmp/*
|
rm -rf /tmp/*
|
||||||
|
|
||||||
COPY --from=build /src/dist/drone-docker-buildx /bin/drone-docker-buildx
|
COPY --from=build /src/dist/drone-docker-buildx /bin/drone-docker-buildx
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "drone-docker-buildx"]
|
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "drone-docker-buildx"]
|
||||||
|
5
Makefile
5
Makefile
@ -24,6 +24,9 @@ XGO_TARGETS ?= linux/amd64,linux/arm64
|
|||||||
|
|
||||||
TARGETOS ?= linux
|
TARGETOS ?= linux
|
||||||
TARGETARCH ?= amd64
|
TARGETARCH ?= amd64
|
||||||
|
ifneq ("$(TARGETVARIANT)","")
|
||||||
|
GOARM ?= $(subst v,,$(TARGETVARIANT))
|
||||||
|
endif
|
||||||
TAGS ?= netgo
|
TAGS ?= netgo
|
||||||
|
|
||||||
ifndef VERSION
|
ifndef VERSION
|
||||||
@ -71,7 +74,7 @@ test:
|
|||||||
build: $(DIST)/$(EXECUTABLE)
|
build: $(DIST)/$(EXECUTABLE)
|
||||||
|
|
||||||
$(DIST)/$(EXECUTABLE): $(SOURCES)
|
$(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):
|
$(DIST_DIRS):
|
||||||
mkdir -p $(DIST_DIRS)
|
mkdir -p $(DIST_DIRS)
|
||||||
|
Loading…
Reference in New Issue
Block a user