Skip to content

Commit

Permalink
fixed permissions and script for deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
simplesteph committed Mar 7, 2018
1 parent 7d82fcb commit f167530
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Empty file modified docker_build.sh
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions docker_push.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ docker_push(){
# TRAVIS_TAG: If the current build is for a git tag, this variable is set to the tag’s name.
# TRAVIS_PULL_REQUEST_BRANCH: if the current job is a pull request, the name of the branch from which the PR originated.

if [[ "$TRAVIS_PULL_REQUEST_BRANCH" == "" ]]; then
if [[ "$TRAVIS_TAG" =! "" ]]; then
if [[ -z "$TRAVIS_PULL_REQUEST_BRANCH" ]]; then
if [[ -n "$TRAVIS_TAG" ]]; then
# Tagging should trigger a release in Docker Hub, that's immutable.
echo "git tag action, push the tag"
docker_push "$TRAVIS_TAG-release"
elif [[ "$TRAVIS_BRANCH" == "master" ]]; then
# we push to latest when master is built and that's not a pull request
echo "master build, push to latest"
docker_push "latest"
elif [[ "$TRAVIS_BRANCH" ~= "v*" ]]; then
elif [[ "$TRAVIS_BRANCH" == "v"* ]]; then
# this is a version branch and we push it.
echo "branch build, push to branch-latest"
docker_push "$TRAVIS_BRANCH-latest"
Expand Down

0 comments on commit f167530

Please sign in to comment.