Skip to content

Commit

Permalink
Add tag_name hack
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <[email protected]>
  • Loading branch information
rsevilla87 committed Jul 30, 2021
1 parent 644cf63 commit 96705cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BIN_PATH = $(BIN_DIR)/$(ARCH)/$(BIN_NAME)
CGO = 0

GIT_COMMIT = $(shell git rev-parse HEAD)
VERSION = $(shell git rev-parse --symbolic-full-name --abbrev-ref HEAD | sed 's/master/latest/' )
VERSION ?= $(shell hack/tag_name.sh)
SOURCES := $(shell find . -type f -name "*.go")
BUILD_DATE = $(shell date '+%Y-%m-%d-%H:%M:%S')
KUBE_BURNER_VERSION= github.com/cloud-bulldozer/kube-burner/pkg/version
Expand Down
7 changes: 7 additions & 0 deletions hack/tag_name.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

if [[ -z $(git branch --show-current) ]]; then
git describe --tags
else
git branch --show-current
fi

0 comments on commit 96705cd

Please sign in to comment.