Skip to content

Commit

Permalink
fix: Fix missing Git version info in release binaries
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Toh <tohjustin@hotmail.com>
  • Loading branch information
tohjustin committed Oct 24, 2021
1 parent dc34ccd commit c78eb76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GORELEASER_VERSION = "0.179.0"
export BUILD_DATE = $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
export GIT_COMMIT = $(shell git rev-parse HEAD)
export GIT_TREE_STATE = $(shell if [ -z "`git status --porcelain`" ]; then echo "clean" ; else echo "dirty"; fi)
export GIT_VERSION = $(shell git describe --tags --always | grep -E '^v\d+\.\d+\.\d+(-.*)?')
export GIT_VERSION = $(shell git describe --tags --always | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-.*)?')
export GIT_VERSION_MAJOR = $(shell if [[ "${GIT_VERSION}" ]]; then echo ${GIT_VERSION} | cut -d 'v' -f 2 | cut -d "." -f 1 ; fi)
export GIT_VERSION_MINOR = $(shell if [[ "${GIT_VERSION}" ]]; then echo ${GIT_VERSION} | cut -d 'v' -f 2 | cut -d "." -f 2 ; fi)
export CGO_ENABLED = 1
Expand Down

0 comments on commit c78eb76

Please sign in to comment.