VOL-617 - ability to build without VM
Change-Id: Iec79d66b7ab98a5421eabe7819fa6325ff6690ce
diff --git a/envoy/go/envoyd/build_binary.sh b/envoy/go/envoyd/build_binary.sh
index ff537a9..a774e21 100755
--- a/envoy/go/envoyd/build_binary.sh
+++ b/envoy/go/envoyd/build_binary.sh
@@ -5,8 +5,6 @@
rm -fr buildreport
rm -f envoyd
docker run -e "http_proxy=$http_proxy" -e "https_proxy=$https_proxy" -v $(pwd):/src ${REGISTRY}${REPOSITORY}voltha-go-builder:${TAG}
-#/build.sh
uid=`id -u`
-gid=`id -g`
-sudo chown -R ${uid}:${gid} buildreport
-sudo chown ${uid}:${gid} envoyd
+sudo chown -R ${uid} buildreport
+sudo chown ${uid} envoyd
diff --git a/envoy/go/golang-builder/build.sh b/envoy/go/golang-builder/build.sh
index 0137347..cdca3b5 100755
--- a/envoy/go/golang-builder/build.sh
+++ b/envoy/go/golang-builder/build.sh
@@ -58,7 +58,7 @@
do
# Grab the last segment from the package name
name=${pkg##*/}
- echo "* Building Go binary: $pkg"
+ echo "* Building Go binary: $pkg to goPath/src/$pkg/$name"
flags=(-a -installsuffix cgo)
ldflags=('-s -X main.version='$BUILD_VERSION)
@@ -76,6 +76,12 @@
goupx $name
fi
+ if [ "$OUTPUT X" != " X" ]; then
+ echo "* Copy Go Binary to \"$OUTPUT/$name\""
+ mkdir -p $OUTPUT
+ cp "$goPath/src/$pkg/$name" "$OUTPUT/$name"
+ fi
+
if [ -e "/var/run/docker.sock" ] && [ -e "$goPath/src/$pkg/Dockerfile" ];
then
@@ -87,4 +93,4 @@
# Build the image from the Dockerfile in the package directory
docker build --pull -t $tagName .
fi
-done
\ No newline at end of file
+done