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
|
- linux
|
||||||
goarch:
|
goarch:
|
||||||
- amd64
|
- amd64
|
||||||
env:
|
|
||||||
- CC=x86_64-linux-gnu-gcc
|
|
||||||
- CXX=x86_64-linux-gnu-g++
|
|
||||||
- id: linux-arm64
|
- id: linux-arm64
|
||||||
main: ./cmd/signerclient
|
main: ./cmd/signerclient
|
||||||
binary: cacert-gosigner
|
binary: cacert-gosigner
|
||||||
|
@ -25,10 +22,6 @@ builds:
|
||||||
- arm64
|
- arm64
|
||||||
goarm:
|
goarm:
|
||||||
- "9"
|
- "9"
|
||||||
env:
|
|
||||||
- CC=aarch64-linux-gnu-gcc
|
|
||||||
- CXX=aarch64-linux-gnu-g++
|
|
||||||
- PKG_CONFIG_PATH=/usr/aarch64-linux-gnu/pkgconfig
|
|
||||||
- id: linux-armhf
|
- id: linux-armhf
|
||||||
main: ./cmd/signerclient
|
main: ./cmd/signerclient
|
||||||
binary: cacert-gosigner
|
binary: cacert-gosigner
|
||||||
|
@ -38,10 +31,6 @@ builds:
|
||||||
- arm
|
- arm
|
||||||
goarm:
|
goarm:
|
||||||
- "7"
|
- "7"
|
||||||
env:
|
|
||||||
- CC=arm-linux-gnueabihf-gcc
|
|
||||||
- CXX=arm-linux-gnueabihf-g++
|
|
||||||
- PKG_CONFIG_PATH=/usr/arm-linux-gnueabihf/pkgconfig
|
|
||||||
archives:
|
archives:
|
||||||
- id: cacert-gosignerclient
|
- id: cacert-gosignerclient
|
||||||
builds:
|
builds:
|
||||||
|
|
7
Makefile
7
Makefile
|
@ -12,9 +12,12 @@ test:
|
||||||
go test -race ./...
|
go test -race ./...
|
||||||
|
|
||||||
signerclient: $(GOFILES)
|
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:
|
clean:
|
||||||
rm -f signerclient
|
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