File tree 5 files changed +6
-8
lines changed
5 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ drone exec
62
62
63
63
To build inside a Docker container:
64
64
``` 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
66
66
```
67
67
68
68
To 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 {
34
34
-v $GOPATH /src/github.com/vmware/vic/bin:/go/src/github.com/vmware/vic/bin \
35
35
-e DEBUG=${DEBUG} \
36
36
-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} " $* "
38
38
}
39
39
40
40
REPO=" 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
88
88
git init . && git remote add origin ${url}
89
89
fi
90
90
91
- if [ ! -z ${refspec} ]; then
91
+ if [ -n " ${refspec} " ]; then
92
92
# we don't limit the depth as that was resulting in failure to find the most recent tag for a given commit
93
93
git fetch origin -v ${refspec}
94
94
if [ " $( git rev-parse --abbrev-ref HEAD) " != " $branch " ]; then
95
95
git checkout -b ${branch} ${localbranch}
96
96
fi
97
97
fi
98
98
99
- if [ -n ${localbranch} ]; then
99
+ if [ -n " ${localbranch} " ]; then
100
100
# try to fast-forward but just checkout if that fails
101
101
git pull --ff-only || git checkout ${localbranch}
102
102
fi
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ DIR=$(dirname $(readlink -f "$0"))
21
21
. $DIR /base/utils.sh
22
22
23
23
function 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
25
25
exit 1
26
26
}
27
27
Original file line number Diff line number Diff line change 18
18
[ -n " $DEBUG " ] && set -x
19
19
BASE_DIR=$( dirname $( readlink -f " $BASH_SOURCE " ) )
20
20
21
- if [ -z ${BUILD_NUMBER+x} ]; then
22
- BUILD_NUMBER=0
23
- fi
21
+ BUILD_NUMBER=${BUILD_NUMBER:- 0}
24
22
25
23
VERSION=` git describe --abbrev=0 --tags` -${BUILD_NUMBER} -` git rev-parse --short HEAD`
26
24
You can’t perform that action at this time.
0 commit comments