Add build script
authorjw_wonny.cha <jw_wonny.cha@samsung.com>
Mon, 25 Mar 2019 08:31:05 +0000 (17:31 +0900)
committerjw_wonny.cha <jw_wonny.cha@samsung.com>
Mon, 25 Mar 2019 08:31:05 +0000 (17:31 +0900)
build.sh [new file with mode: 0755]

diff --git a/build.sh b/build.sh
new file mode 100755 (executable)
index 0000000..f4f878b
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,16 @@
+#! /bin/bash
+SERVICE_BIN="edge-orchestration"
+BASE_DIR=$( cd "$(dirname "$0")" ; pwd )
+
+if [ -e $BASE_DIR/vendor/ ]; then
+    ln -sf $BASE_DIR/vendor $BASE_DIR/vendor/src
+fi
+
+export GOARCH=amd64
+export GOBIN=$BASE_DIR/bin
+export GOPATH=$GOPATH:$BASE_DIR:$BASE_DIR/vendor
+
+go build -a -ldflags '-extldflags "-static"' -o $BASE_DIR/bin/$SERVICE_BIN orchestration
+
+cd $GOBIN
+ls -ail
\ No newline at end of file