Skip to content

Commit e4fd4f6

Browse files
committed
version from git
1 parent cba1b39 commit e4fd4f6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
testserver:
22
go run -ldflags="-X 'main.VERSION=test'" ./cmd/lcode-hub
33
build:
4-
go build -ldflags="-X 'main.VERSION=build'" -ldflags="-s -w" -o lcode-hub ./cmd/lcode-hub
4+
go build -ldflags="-X 'main.VERSION=$$(git describe --tags --exact-match || git symbolic-ref -q --short HEAD)' -s -w" -o lcode-hub ./cmd/lcode-hub
5+
build-with-upx: build
56
upx lcode-hub

0 commit comments

Comments
 (0)