Skip to content

Commit 2d51acb

Browse files
committed
build: makefile add arm arch
1 parent fd33f92 commit 2d51acb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
pingexporter
1+
pingexporter
2+
pingexporter.toml

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
version=$(shell git describe --tags --always)
2+
ldflags="-s -w -X github.com/jimyag/version-go.version=$(version) -X github.com/jimyag/version-go.enableCmd=true"
23
build:
3-
go build -o pingexporter -v --trimpath -ldflags "-s -w -X github.com/jimyag/version-go.version=$(version) -X github.com/jimyag/version-go.enableCmd=true" ./
4+
go build -o pingexporter -v --trimpath -ldflags ${ldflags} ./
5+
arm64:
6+
CGO_ENABLED=0 GOARCH=arm64 go build -o pingexporter -v --trimpath -ldflags ${ldflags} ./

0 commit comments

Comments
 (0)