Release 2.3.1 -> Develop #171

Merged
sloum merged 14 commits from release-2.3.1 into develop 2020-05-30 16:51:05 +00:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 573eb0d230 - Show all commits

View File

@ -14,7 +14,7 @@ test : GOCMD := go1.11.13
BUILD_TIME := ${shell date "+%Y-%m-%dT%H:%M%z"}
# If VERSION is empty or not defined use the contents of the VERSION file
VERSION := ${shell git describe --tags 2> /dev/null}
VERSION := ${shell git describe --exact-match 2> /dev/null}
Review

The previous --tags flag would always give the most recent tag, so would never use the file that was included. Using --exact-match means that if the exact commit that we are on does not have a tag an error will be returned on stderr (which we toss out) and we will read the version from the VERSION file. This is less buggy, if slightly more manual, and more inline with the intention from when jboverf set this par tof the makefile up.

The previous `--tags` flag would always give the most recent tag, so would never use the file that was included. Using `--exact-match` means that if the exact commit that we are on does not have a tag an error will be returned on stderr (which we toss out) and we will read the version from the VERSION file. This is less buggy, if slightly more manual, and more inline with the intention from when jboverf set this par tof the makefile up.
ifndef VERSION
VERSION := ${shell cat ./VERSION}
endif