forked from cgrates/cgrates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·24 lines (19 loc) · 894 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /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=$?
go install -ldflags "-X 'github.com/cgrates/cgrates/utils.GitLastLog=$GIT_LAST_LOG'" github.com/cgrates/cgrates/cmd/cgr-tester
ct=$?
exit $cr || $cl || $cc || $cm || $ct