Merge branch 'EDGE-242' of github.sec.samsung.net:RS7-EdgeComputing/edge-home-orchest...
[platform/core/system/edge-orchestration.git] / build.sh
1 #! /bin/bash
2 SERVICE_BIN="edge-orchestration"
3 BASE_DIR=$( cd "$(dirname "$0")" ; pwd )
4
5 if [ -e $BASE_DIR/vendor/ ]; then
6     ln -sf $BASE_DIR/vendor $BASE_DIR/vendor/src
7 fi
8
9 export GOARCH=amd64
10 export GOBIN=$BASE_DIR/bin
11 export GOPATH=$GOPATH:$BASE_DIR:$BASE_DIR/vendor
12
13 go build -a -ldflags '-extldflags "-static"' -o $BASE_DIR/bin/$SERVICE_BIN orchestration
14
15 cd $GOBIN
16 ls -ail