Skip to content

Commit

Permalink
Stable releases
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewDryga committed Apr 25, 2017
1 parent a42c11d commit 5fd06d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bin/ci/push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ git remote add upstream $REPO_URL
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
if [ "$TRAVIS_BRANCH" == "$RELEASE_BRANCH" ]; then
./bin/release.sh -a $DOCKER_HUB_ACCOUNT -t $TRAVIS_BRANCH -l;
elif [ "$TRAVIS_BRANCH" == "stable" ]; then
./bin/release.sh -a $DOCKER_HUB_ACCOUNT -t $TRAVIS_BRANCH -l -s;
fi;

if [[ "$MAIN_BRANCHES" =~ "$TRAVIS_BRANCH" ]]; then
Expand Down
9 changes: 8 additions & 1 deletion bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ else
fi

# Parse ARGS
while getopts "v:la:ft:" opt; do
while getopts "v:lsa:ft:" opt; do
case "$opt" in
a) HUB_ACCOUNT=$OPTARG
;;
Expand All @@ -48,6 +48,8 @@ while getopts "v:la:ft:" opt; do
;;
l) IS_LATEST=1
;;
s) IS_LATEST=1
;;
f) PASS_GIT=1
;;
esac
Expand Down Expand Up @@ -96,5 +98,10 @@ if [ $IS_LATEST == 1 ]; then
docker tag "${PROJECT_NAME}:${PROJECT_VERSION}" "${HUB_ACCOUNT}/${PROJECT_NAME}:latest"
fi

if [ $IS_STABLE == 1 ]; then
echo "[I] Assigning additional tag '${HUB_ACCOUNT}/${PROJECT_NAME}:latest'.."
docker tag "${PROJECT_NAME}:${PROJECT_VERSION}" "${HUB_ACCOUNT}/${PROJECT_NAME}:latest"
fi

echo "[I] Pushing changes to Docker Hub.."
docker push "${HUB_ACCOUNT}/${PROJECT_NAME}"

0 comments on commit 5fd06d0

Please sign in to comment.