Skip to content

Commit c8a1244

Browse files
authored
Correctly set version build flags. (#82)
1 parent 3e9d921 commit c8a1244

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
.ONESHELL:
21
SHA := $(shell git rev-parse --short=8 HEAD)
32
GITVERSION := $(shell git describe --long --all)
4-
BUILDDATE := $(shell date -Iseconds)
5-
VERSION := $(or ${VERSION},devel)
3+
# gnu date format iso-8601 is parsable with Go RFC3339
4+
BUILDDATE := $(shell date --iso-8601=seconds)
5+
VERSION := $(or ${VERSION},$(shell git describe --tags --exact-match 2> /dev/null || git symbolic-ref -q --short HEAD || git rev-parse --short HEAD))
66

77
all: test metal-bmc
88

0 commit comments

Comments
 (0)