Skip to content

Commit

Permalink
fix: add condition for version_metadata in Makefile (#1128)
Browse files Browse the repository at this point in the history
fix: add condition for version_metadata

Signed-off-by: Harshvir Potpose <[email protected]>
  • Loading branch information
akagami-harsh authored Mar 21, 2024
1 parent e53812c commit d9f7e62
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@ endif
VERSION ?= latest

VERSION_METADATA = unreleased
ifneq ($(GIT_TAG),)
VERSION_METADATA =
ifneq ($(filter v%[0-9].%[0-9].%[0-9],$(GIT_TAG)),)
VERSION_METADATA = stable
else ifneq ($(filter v%[0-9].%[0-9].%[0-9]-%,$(GIT_TAG)),)
VERSION_METADATA = prerelease
else ifneq ($(filter v%[0-9].%[0-9].%[0-9]-released,$(GIT_TAG)),)
VERSION_METADATA = released
endif

LDFLAGS += -X github.com/konveyor/${BINNAME}/types/info.buildmetadata=${VERSION_METADATA}

LDFLAGS += -X github.com/konveyor/${BINNAME}/types/info.gitCommit=${GIT_COMMIT}
Expand Down

0 comments on commit d9f7e62

Please sign in to comment.