cacert-gosignerclient/Makefile
Jan Dittberner 199f0ee0c0 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
2022-12-02 09:49:38 +01:00

23 lines
No EOL
579 B
Makefile

GOFILES := $(shell find -type f -name '*.go')
BUILD_TIME := $(shell date --rfc-3339=seconds)
COMMIT := $(shell git show-ref --head --abbrev=8 HEAD|cut -d ' ' -f 1)
VERSION := $(shell git describe --always --dirty)
all: lint test signerclient
lint:
golangci-lint run
test:
go test -race ./...
signerclient: $(GOFILES)
go build -race -trimpath -ldflags="-X 'main.date=$(BUILD_TIME)' -X 'main.commit=$(COMMIT)' -X 'main.version=$(VERSION)'" ./cmd/signerclient
clean:
rm -f signerclient
snapshot:
goreleaser build --rm-dist --snapshot
.PHONY: test lint all clean snapshot