Change build script to build latest release versions if not in CI (#115)

Build.sh can build the latest versions of the images using the VERSION file under the two repos (core & web).
This commit is contained in:
Abhilash Raj
2017-08-09 16:34:01 -07:00
committed by GitHub
parent 71dc87143e
commit b477b891b6
4 changed files with 24 additions and 8 deletions

View File

@@ -4,13 +4,21 @@ set -e
# Use this script to build docker images.
if [ "$TRAVIS_BRANCH" = "master" ]; then
TAG="latest"
if [[ "$TRAVIS" ]]
then
if [ "$TRAVIS_BRANCH" = "master" ]; then
CORE_TAG="latest"
WEB_TAG="latest"
else
CORE_TAG="$TRAVIS_BRANCH"
WEB_TAG="$TRAVIS_BRANCH"
fi
else
TAG="$TRAVIS_BRANCH"
CORE_TAG=`cat core/VERSION`
WEB_TAG=`cat web/VERSION`
fi
DOCKER=docker
$DOCKER build -t maxking/mailman-core:$TAG core/
$DOCKER build -t maxking/mailman-web:$TAG web/
$DOCKER build -t maxking/mailman-core:$CORE_TAG core/
$DOCKER build -t maxking/mailman-web:$WEB_TAG web/