From d36526b1c8a1cc0c090b1421cb1e35a8b714fa80 Mon Sep 17 00:00:00 2001 From: Asher Date: Tue, 17 Sep 2019 14:45:03 -0500 Subject: [PATCH] Move DOCKER_BUILD check into deploy script --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f2c3fb9b..3a05afcb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,7 +46,7 @@ before_deploy: - git config --local user.name "$USER_NAME" - git config --local user.email "$USER_EMAIL" - if ! git tag "$TAG" "$TRAVIS_COMMIT" ; then echo "$TAG already exists"; fi - - if [[ "$DOCKER_BUILD" == "true" ]] ; then echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin hub.docker.com; fi + - if [[ -n "$DOCKER_BUILD" ]] ; then echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin hub.docker.com ; fi deploy: - provider: releases @@ -67,11 +67,10 @@ deploy: - provider: script skip_cleanup: true - script: docker push codercom/code-server:"$VERSION" ; docker push codercom/code-server:v2 + script: if [[ -n "$DOCKER_BUILD" ]] ; then docker push codercom/code-server:"$VERSION" && docker push codercom/code-server:v2 ; fi on: repo: cdr/code-server branch: master - condition: "$DOCKER_BUILD" == "true" cache: yarn: true