2022-11-28 16:10:46 +00:00
|
|
|
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: pkg/messages/resolver.msgpackgen.go lint test clientsim signer
|
|
|
|
|
|
|
|
pkg/messages/resolver.msgpackgen.go: pkg/messages/messages.go
|
|
|
|
go generate $<
|
|
|
|
|
|
|
|
lint:
|
|
|
|
golangci-lint run
|
|
|
|
|
|
|
|
test:
|
|
|
|
go test -race ./...
|
|
|
|
|
|
|
|
clientsim: $(GOFILES)
|
2022-12-02 08:44:52 +00:00
|
|
|
go build -race -trimpath ./cmd/clientsim
|
2022-11-28 16:10:46 +00:00
|
|
|
|
|
|
|
signer: $(GOFILES)
|
2022-12-02 08:44:52 +00:00
|
|
|
go build -race -trimpath -ldflags="-X 'main.date=$(BUILD_TIME)' -X 'main.commit=$(COMMIT)' -X 'main.version=$(VERSION)'" ./cmd/signer
|
2022-11-28 16:10:46 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f signer clientsim pkg/messages/resolver.msgpackgen.go
|
|
|
|
|
2022-12-02 08:44:52 +00:00
|
|
|
snapshot:
|
|
|
|
goreleaser build --rm-dist --snapshot
|
|
|
|
|
|
|
|
.PHONY: test lint all clean snapshot
|