From 77e4ca7be774b58e483083fa1f586aae963635e4 Mon Sep 17 00:00:00 2001 From: Trial97 Date: Tue, 11 Feb 2020 10:49:53 +0200 Subject: [PATCH] Updated build script to check git tag --- build.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build.sh b/build.sh index ce10713e6..5ec824b60 100755 --- a/build.sh +++ b/build.sh @@ -3,6 +3,13 @@ echo "Building CGRateS ..." GIT_LAST_LOG=$(git log -1 | tr -d "'") +GIT_TAG_LOG=$(git tag -l --points-at HEAD) + +if [ ! -z "$GIT_TAG_LOG" ] +then + GIT_LAST_LOG="" +fi + go install -ldflags "-X 'github.com/cgrates/cgrates/utils.GitLastLog=$GIT_LAST_LOG'" github.com/cgrates/cgrates/cmd/cgr-engine cr=$? go install -ldflags "-X 'github.com/cgrates/cgrates/utils.GitLastLog=$GIT_LAST_LOG'" github.com/cgrates/cgrates/cmd/cgr-loader