@@ -7,35 +7,36 @@ set -e -u -o pipefail # Fail on error
77dir=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd )
88cd " $dir "
99
10- build_dir= " /tmp/build_keybase "
11- client_dir= " $GOPATH /src/github.com/keybase/client "
10+ version= ${VERSION :- }
11+ token= ${GITHUB_TOKEN :- }
1212
13- echo " Loading release tool"
14- " $client_dir /packaging/goinstall.sh" " github.com/keybase/release"
15- release_bin=" $GOPATH /bin/release"
16-
17- version=" ${VERSION:- } "
1813if [ " $version " = " " ]; then
1914 echo " Specify VERSION to build"
2015 exit 1
2116fi
22- tag=" v$version "
23- tgz=" keybase-$version .tgz"
24- token=" ${GITHUB_TOKEN:- } "
2517
2618if [ " $token " = " " ]; then
2719 echo " No GITHUB_TOKEN set. See https://help.github.com/articles/creating-an-access-token-for-command-line-use/"
2820 exit 2
2921fi
3022
23+ build_dir=" /tmp/build_keybase"
24+ client_dir=" $GOPATH /src/github.com/keybase/client"
25+ tag=" v$version "
26+ tgz=" keybase-$version .tgz"
27+
28+ echo " Loading release tool"
29+ " $client_dir /packaging/goinstall.sh" " github.com/keybase/release"
30+ release_bin=" $GOPATH /bin/release"
31+
3132build () {
3233 rm -rf " $build_dir "
3334 mkdir -p " $build_dir "
3435 cd " $build_dir "
3536
3637 echo " Downloading source archive"
3738 src_url=" https://github.com/keybase/client/archive/v$version .tar.gz"
38- curl -O -J -L $src_url
39+ curl -O -J -L " $src_url "
3940
4041 src_tgz=" client-$version .tar.gz"
4142 echo " Unpacking $src_tgz "
@@ -48,7 +49,7 @@ build() {
4849 mv " client-$version " " $go_dir /src/github.com/keybase/client"
4950
5051 echo " Building keybase"
51- GO15VENDOREXPERIMENT=1 GOPATH=$go_dir go build -a -tags " production" -o keybase github.com/keybase/client/go/keybase
52+ GO15VENDOREXPERIMENT=1 GOPATH=" $go_dir " go build -a -tags " production" -o keybase github.com/keybase/client/go/keybase
5253
5354 echo " Packaging"
5455 rm -rf " $tgz "
@@ -64,15 +65,15 @@ create_release() {
6465 cd " $build_dir "
6566 platform=` $release_bin platform`
6667 echo " Creating release"
67- $release_bin create --version=" $version " --repo=" client"
68+ " $release_bin " create --version=" $version " --repo=" client"
6869 fi
6970}
7071
7172upload_release () {
7273 cd " $build_dir "
7374 platform=` $release_bin platform`
7475 echo " Uploading release"
75- $release_bin upload --src=" $tgz " --dest=" keybase-$version -$platform .tgz" --version=" $version " --repo=" client"
76+ " $release_bin " upload --src=" $tgz " --dest=" keybase-$version -$platform .tgz" --version=" $version " --repo=" client"
7677}
7778
7879build
0 commit comments