You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
792 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: 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)
go build -race -trimpath ./cmd/clientsim
signer: $(GOFILES)
go build -race -trimpath -ldflags="-X 'main.date=$(BUILD_TIME)' -X 'main.commit=$(COMMIT)' -X 'main.version=$(VERSION)'" ./cmd/signer
clean:
rm -f signer clientsim pkg/messages/resolver.msgpackgen.go
snapshot:
goreleaser build --rm-dist --snapshot
.PHONY: test lint all clean snapshot