]> git.sur5r.net Git - i3/i3/blob - travis/docker-build-and-push.sh
Remove unmaintained CHANGELOG file from i3bar
[i3/i3] / travis / docker-build-and-push.sh
1 #!/bin/sh
2
3 set -e
4
5 # .dockerignore is created on demand so that release.sh and other scripts are
6 # not influenced by our travis setup.
7 echo .git > .dockerignore
8
9 docker build --pull --no-cache --rm -t=${BASENAME} -f travis-build.Dockerfile .
10 # For pull requests, travis does not add secure environment variables to the
11 # environment (because pull requests could then steal their values), so skip
12 # the login+push step when the variable isn’t set.
13 if [ -n "${DOCKER_PASS}" ]
14 then
15         docker login -e ${DOCKER_EMAIL} -u ${DOCKER_USER} -p ${DOCKER_PASS}
16         docker push ${BASENAME}
17 fi