File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ drone exec
6262
6363To build inside a Docker container:
6464``` shell
65- docker run -v $( pwd) :/go/src/github.com/vmware/vic gcr.io/eminent-nation-87317/vic-build-image:tdnf make all
65+ docker run -v $GOPATH /bin:/go/bin -v $ ( pwd) :/go/src/github.com/vmware/vic gcr.io/eminent-nation-87317/vic-build-image:tdnf make all
6666```
6767
6868To build directly, you also need the Go 1.8 toolchain installed:
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ function main {
3434 -v $GOPATH /src/github.com/vmware/vic/bin:/go/src/github.com/vmware/vic/bin \
3535 -e DEBUG=${DEBUG} \
3636 -e BUILD_NUMBER=${BUILD_NUMBER} \
37- gcr.io/eminent-nation-87317/vic-build-image:${PKGMGR:- tdnf} /bin/bash -c " $* "
37+ gcr.io/eminent-nation-87317/vic-build-image:${PKGMGR:- tdnf} " $* "
3838}
3939
4040REPO=" photon-2.0"
Original file line number Diff line number Diff line change @@ -88,15 +88,15 @@ if ! git remote show -n origin >/dev/null 2>&1 ; then
8888 git init . && git remote add origin ${url}
8989fi
9090
91- if [ ! -z ${refspec} ]; then
91+ if [ -n " ${refspec} " ]; then
9292 # we don't limit the depth as that was resulting in failure to find the most recent tag for a given commit
9393 git fetch origin -v ${refspec}
9494 if [ " $( git rev-parse --abbrev-ref HEAD) " != " $branch " ]; then
9595 git checkout -b ${branch} ${localbranch}
9696 fi
9797fi
9898
99- if [ -n ${localbranch} ]; then
99+ if [ -n " ${localbranch} " ]; then
100100 # try to fast-forward but just checkout if that fails
101101 git pull --ff-only || git checkout ${localbranch}
102102fi
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ DIR=$(dirname $(readlink -f "$0"))
2121. $DIR /base/utils.sh
2222
2323function usage() {
24- echo " Usage: $0 -p package-name(tgz) [-c package-cache]" 1>&2
24+ echo " Usage: $0 -p package-name(tgz) [-c package-cache] [-r repo] " 1>&2
2525exit 1
2626}
2727
Original file line number Diff line number Diff line change 1818[ -n " $DEBUG " ] && set -x
1919BASE_DIR=$( dirname $( readlink -f " $BASH_SOURCE " ) )
2020
21- if [ -z ${BUILD_NUMBER+x} ]; then
22- BUILD_NUMBER=0
23- fi
21+ BUILD_NUMBER=${BUILD_NUMBER:- 0}
2422
2523VERSION=` git describe --abbrev=0 --tags` -${BUILD_NUMBER} -` git rev-parse --short HEAD`
2624
You can’t perform that action at this time.
0 commit comments