specific arch platform
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
ae6c01bd67
commit
bb7abb9a0a
3
Makefile
3
Makefile
|
@ -7,6 +7,7 @@ DEPLOY_IMAGE := $(EXECUTABLE)
|
||||||
GOFMT ?= gofmt "-s"
|
GOFMT ?= gofmt "-s"
|
||||||
|
|
||||||
TARGETS ?= linux darwin windows openbsd
|
TARGETS ?= linux darwin windows openbsd
|
||||||
|
ARCHS ?= amd64 386
|
||||||
PACKAGES ?= $(shell $(GO) list ./...)
|
PACKAGES ?= $(shell $(GO) list ./...)
|
||||||
GOFILES := $(shell find . -name "*.go" -type f)
|
GOFILES := $(shell find . -name "*.go" -type f)
|
||||||
TAGS ?= sqlite
|
TAGS ?= sqlite
|
||||||
|
@ -110,7 +111,7 @@ release-build:
|
||||||
@hash gox > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
@hash gox > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||||
$(GO) get -u github.com/mitchellh/gox; \
|
$(GO) get -u github.com/mitchellh/gox; \
|
||||||
fi
|
fi
|
||||||
gox -os="$(TARGETS)" -tags="$(TAGS)" -ldflags="$(EXTLDFLAGS)-s -w $(LDFLAGS)" -output="$(DIST)/binaries/$(EXECUTABLE)-$(VERSION)-{{.OS}}-{{.Arch}}"
|
gox -os="$(TARGETS)" -arch="$(ARCHS)" -tags="$(TAGS)" -ldflags="$(EXTLDFLAGS)-s -w $(LDFLAGS)" -output="$(DIST)/binaries/$(EXECUTABLE)-$(VERSION)-{{.OS}}-{{.Arch}}"
|
||||||
|
|
||||||
release-copy:
|
release-copy:
|
||||||
$(foreach file,$(wildcard $(DIST)/binaries/$(EXECUTABLE)-*),cp $(file) $(DIST)/release/$(notdir $(file));)
|
$(foreach file,$(wildcard $(DIST)/binaries/$(EXECUTABLE)-*),cp $(file) $(DIST)/release/$(notdir $(file));)
|
||||||
|
|
Loading…
Reference in New Issue