Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Only create release tags for Python 2.7 job
Browse files Browse the repository at this point in the history
Create the release tag if the Python 2.7 job succeeds. Don't do anything
in the Python 3 job.

This is a bit of a workaround for the fact that there's no way of
running scripts after *all* jobs complete on Travis. That means we end
up trying to release tag in every successful job.

See travis-ci/travis-ci#929
  • Loading branch information
Paul M Furley committed Feb 26, 2014
1 parent ac52318 commit e77b1fa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .travis_scripts/push_release_tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ function ensure_running_in_travis_master_branch {
fi
}

function ensure_only_tagging_on_production_python_version {
if [ "${TRAVIS_PYTHON_VERSION}" != "2.7" ]; then
echo "Not release tagging for Python version ${TRAVIS_PYTHON_VERSION}"
exit 3
fi
}

function make_temp_repo_directory {
TMP_REPO_DIR=$(mktemp --directory --suffix _travis_${TRAVIS_BUILD_NUMBER})
}
Expand Down Expand Up @@ -87,6 +94,7 @@ function setup_fake_travis_environment {
TRAVIS_BRANCH="master"
TRAVIS_COMMIT="3aed87b4f7bbb62e15fef65bd9a1b27d07d6e351"
TRAVIS_BUILD_NUMBER="123456789"
TRAVIS_PYTHON_VERSION="2.7"
GH_TOKEN="${TESTING_GITHUB_TOKEN}"
}

Expand All @@ -100,6 +108,7 @@ fi


ensure_running_in_travis_master_branch
ensure_only_tagging_on_production_python_version
make_temp_repo_directory
clone_repo
make_release_tag_from_travis_build_number
Expand Down

0 comments on commit e77b1fa

Please sign in to comment.