2020-02-19 05:18:36 +00:00
|
|
|
GO ?= go
|
2020-10-07 04:05:29 +00:00
|
|
|
VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
|
2020-02-19 05:18:36 +00:00
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build:
|
2020-10-07 04:05:29 +00:00
|
|
|
$(GO) build -ldflags '-s -w -X "go.jolheiser.com/gpm/modules/config.Version=$(VERSION)"'
|
2020-02-19 05:18:36 +00:00
|
|
|
|
|
|
|
.PHONY: fmt
|
|
|
|
fmt:
|
|
|
|
$(GO) fmt ./...
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test:
|
|
|
|
$(GO) test -race ./...
|