Updated build script to check git tag

This commit is contained in:
Trial97
2020-02-11 10:49:53 +02:00
committed by Dan Christian Bogos
parent 9225cfffb2
commit 77e4ca7be7

View File

@@ -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