forked from skycoin/teller
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-build.sh
More file actions
executable file
·42 lines (31 loc) · 981 Bytes
/
docker-build.sh
File metadata and controls
executable file
·42 lines (31 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
if [ ! -f ~/.netrc ] ; then
echo "Configuring private dependency access"
# configuring private dependency access:
#https://docs.travis-ci.com/user/languages/go/#Installing-Private-Dependencies
echo "machine github.com
login $GITHUB_USER
password $GITHUB_KEY
" > ~/.netrc
chmod 600 ~/.netrc
fi
echo Creating mock GOPATH
export GOPATH=~/go
if [ ! -e $GOPATH/src/github.com/kittycash/teller ] ; then
mkdir -p $GOPATH/src/github.com/kittycash
ln -s $PWD $GOPATH/src/github.com/kittycash/teller
cd $GOPATH/src/github.com/kittycash/teller
fi
if [ ! $(which dep) ] ; then
echo Installing "'dep'"
mkdir -p ~/go/bin
export PATH=~/go/bin:$PATH
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
fi
echo Running "'dep ensure -v'"
dep ensure -v || exit 1
echo "Running 'make test'"
make test || exit 1
for tag in $(./docker-tags.sh) ; do
docker build --pull --cache-from kittycash/teller --tag "$tag" . || exit 1
done