Files
cgrates/build.sh
2021-03-30 20:49:53 +02:00

23 lines
754 B
Bash
Executable File

#! /usr/bin/env sh
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
cl=$?
go install -ldflags "-X 'github.com/cgrates/cgrates/utils.GitLastLog=$GIT_LAST_LOG'" github.com/cgrates/cgrates/cmd/cgr-console
cc=$?
go install -ldflags "-X 'github.com/cgrates/cgrates/utils.GitLastLog=$GIT_LAST_LOG'" github.com/cgrates/cgrates/cmd/cgr-migrator
cm=$?
exit $cr || $cl || $cc || $cm