Build system improvements
- remove cgo specific environment variables from goreleaser configuration - add -trimpath option to go build calls - add snapshot target in Makefile to run goreleaser
This commit is contained in:
parent
9fda786348
commit
199f0ee0c0
2 changed files with 5 additions and 13 deletions
|
@ -13,9 +13,6 @@ builds:
|
|||
- linux
|
||||
goarch:
|
||||
- amd64
|
||||
env:
|
||||
- CC=x86_64-linux-gnu-gcc
|
||||
- CXX=x86_64-linux-gnu-g++
|
||||
- id: linux-arm64
|
||||
main: ./cmd/signerclient
|
||||
binary: cacert-gosigner
|
||||
|
@ -25,10 +22,6 @@ builds:
|
|||
- arm64
|
||||
goarm:
|
||||
- "9"
|
||||
env:
|
||||
- CC=aarch64-linux-gnu-gcc
|
||||
- CXX=aarch64-linux-gnu-g++
|
||||
- PKG_CONFIG_PATH=/usr/aarch64-linux-gnu/pkgconfig
|
||||
- id: linux-armhf
|
||||
main: ./cmd/signerclient
|
||||
binary: cacert-gosigner
|
||||
|
@ -38,10 +31,6 @@ builds:
|
|||
- arm
|
||||
goarm:
|
||||
- "7"
|
||||
env:
|
||||
- CC=arm-linux-gnueabihf-gcc
|
||||
- CXX=arm-linux-gnueabihf-g++
|
||||
- PKG_CONFIG_PATH=/usr/arm-linux-gnueabihf/pkgconfig
|
||||
archives:
|
||||
- id: cacert-gosignerclient
|
||||
builds:
|
||||
|
|
7
Makefile
7
Makefile
|
@ -12,9 +12,12 @@ test:
|
|||
go test -race ./...
|
||||
|
||||
signerclient: $(GOFILES)
|
||||
go build -race -ldflags="-X 'main.date=$(BUILD_TIME)' -X 'main.commit=$(COMMIT)' -X 'main.version=$(VERSION)'" ./cmd/signerclient
|
||||
go build -race -trimpath -ldflags="-X 'main.date=$(BUILD_TIME)' -X 'main.commit=$(COMMIT)' -X 'main.version=$(VERSION)'" ./cmd/signerclient
|
||||
|
||||
clean:
|
||||
rm -f signerclient
|
||||
|
||||
.PHONY: test lint all clean
|
||||
snapshot:
|
||||
goreleaser build --rm-dist --snapshot
|
||||
|
||||
.PHONY: test lint all clean snapshot
|
Loading…
Reference in a new issue