Create GOPATH within WORKSPACE, rather home directory. Clarify docs
Change-Id: Ie94c2ed9ab096b4c34065971492a44454b172675
diff --git a/jjb/shell/github-release.sh b/jjb/shell/github-release.sh
index 1e31421..2ab2c94 100644
--- a/jjb/shell/github-release.sh
+++ b/jjb/shell/github-release.sh
@@ -56,18 +56,18 @@
# To support golang projects create a GOPATH
# If $DEST_GOPATH is not an empty string:
-# - set create GOPATH, and destination directory within in
+# - create GOPATH within WORKSPACE, and destination directory within
# - set PATH to include $GOPATH/bin and the system go binaries
-# - symlink from $WORKSPACE/$GERRIT_PROJECT to new location in $GOPATH
-# - start release from that directory
+# - move project from $WORKSPACE/$GERRIT_PROJECT to new location in $GOPATH
+# - start release process within that directory
DEST_GOPATH=${DEST_GOPATH:-}
if [ ! -z "$DEST_GOPATH" ]; then
- export GOPATH=${GOPATH:-~/go}
+ export GOPATH=${GOPATH:-$WORKSPACE/go}
mkdir -p "$GOPATH/src/$DEST_GOPATH"
export PATH=$PATH:/usr/lib/go-1.12/bin:/usr/local/go/bin:$GOPATH/bin
release_path="$GOPATH/src/$DEST_GOPATH/$GERRIT_PROJECT"
- ln -r -s "$WORKSPACE/$GERRIT_PROJECT" "$release_path"
+ mv "$WORKSPACE/$GERRIT_PROJECT" "$release_path"
else
release_path="$WORKSPACE/$GERRIT_PROJECT"
fi
diff --git a/jjb/shell/make-unit.sh b/jjb/shell/make-unit.sh
index 9bcaf09..a6920e3 100755
--- a/jjb/shell/make-unit.sh
+++ b/jjb/shell/make-unit.sh
@@ -24,14 +24,14 @@
# Fixes to for golang projects to support GOPATH
# If $DEST_GOPATH is not an empty string:
-# - set create GOPATH, and destination directory within in
+# - create GOPATH within WORKSPACE, and destination directory within
# - set PATH to include $GOPATH/bin and the system go binaries
-# - symlink from $WORKSPACE/$GERRIT_PROJECT to new location in $GOPATH
-# - start tests in that directory
+# - move project from $WORKSPACE/$GERRIT_PROJECT to new location in $GOPATH
+# - start tests within that directory
DEST_GOPATH=${DEST_GOPATH:-}
if [ ! -z "$DEST_GOPATH" ]; then
- export GOPATH=${GOPATH:-~/go}
+ export GOPATH=${GOPATH:-$WORKSPACE/go}
mkdir -p "$GOPATH/src/$DEST_GOPATH"
export PATH=$PATH:/usr/lib/go-1.12/bin:/usr/local/go/bin:$GOPATH/bin
test_path="$GOPATH/src/$DEST_GOPATH/$GERRIT_PROJECT"