Makefile: set version from git tag
This commit is contained in:
parent
d3fea6ec4b
commit
9786dc2c53
1 changed files with 3 additions and 2 deletions
3
Makefile
3
Makefile
|
|
@ -1,5 +1,6 @@
|
||||||
GO=go
|
GO=go
|
||||||
GOLDFLAGS=-v -s -w
|
VERSION=$(shell git describe --always --tags --dirty --match="v*")
|
||||||
|
GOLDFLAGS=-v -s -w -X main.version="$(VERSION)"
|
||||||
GOBUILDFLAGS=-v -p $(shell nproc) -ldflags="$(GOLDFLAGS)"
|
GOBUILDFLAGS=-v -p $(shell nproc) -ldflags="$(GOLDFLAGS)"
|
||||||
|
|
||||||
.PHONY: build test
|
.PHONY: build test
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue