diff --git a/package.sh b/package.sh index 7f262ffc2..cbae8ae86 100755 --- a/package.sh +++ b/package.sh @@ -167,10 +167,18 @@ do_build() { for b in ${BINS[*]}; do rm -f $GOPATH_INSTALL/bin/$b done + # If the branch has an upstream, go get switches to master for some reason + # unsetting the upstream causes go get to stay on the current branch, but + # is admittedly a little annoying + git branch --unset-upstream + if [ $? == 0 ]; then + echo "WARNING: upstream branch unset for go get command to work" + fi go get -u -f ./... if [ $? -ne 0 ]; then echo "WARNING: failed to 'go get' packages." fi + go install -a -ldflags="-X main.Version $version -X main.Commit $commit" ./... if [ $? -ne 0 ]; then echo "Build failed, unable to create package -- aborting"