Skip to content

Commit 5fd455b

Browse files
author
Ryota Yoshikawa
committed
Use osarch option and support linux/arm64
1 parent cb7154e commit 5fd455b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
COMMIT = $(shell git describe --always)
22
VERSION = $(shell grep Version cli/version.go | sed -E 's/.*"(.+)"$$/\1/')
33
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
4+
GOXOSARCH ?= "darwin/amd64 linux/amd64 linux/arm64 windows/amd64"
45

56
default: build
67

@@ -9,7 +10,7 @@ build:
910
go build -ldflags "-X main.GitCommit=$(COMMIT)" -o bin/exporter_proxy .
1011

1112
buildx:
12-
gox -ldflags "-X main.GitCommit=$(COMMIT)" -output "bin/v$(VERSION)/{{.Dir}}_{{.OS}}_{{.Arch}}" -arch "amd64" -os "linux darwin" .
13+
gox -ldflags "-X main.GitCommit=$(COMMIT)" -output "bin/v$(VERSION)/{{.Dir}}_{{.OS}}_{{.Arch}}" -osarch $(GOXOSARCH) .
1314

1415
lint:
1516
golint ${GOFILES_NOVENDOR}

0 commit comments

Comments
 (0)