diff --git a/.travis.yml b/.travis.yml index b25f7eb..3161085 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,7 @@ matrix: after_success: - bash scripts/bump_script.sh || exit 1 - bash scripts/generate_docs.sh || exit 1 + - export TRAVIS_TAG=`git describe --exact-match --tags` deploy: - provider: pypi user: $PYPI_USER diff --git a/scripts/bump_script.sh b/scripts/bump_script.sh index 9c9269d..c0897a2 100644 --- a/scripts/bump_script.sh +++ b/scripts/bump_script.sh @@ -4,7 +4,7 @@ push_commit() { git remote rm origin # Add new "origin" with access token in the git URL for authentication git remote add origin https://$GITHUB_PERSONAL_ACCESS_TOKEN@github.com/ww-tech/primrose.git > /dev/null 2>&1 - git push origin $TRAVIS_BRANCH --quiet && git push origin $TRAVIS_BRANCH --tags --quiet + git push origin $TRAVIS_BRANCH:master --quiet && git push origin $TRAVIS_BRANCH:master --tags --quiet } # use git tag to trigger a build and decide how to increment @@ -13,7 +13,6 @@ echo "current version: $current_version" if [[ $TRAVIS_EVENT_TYPE != 'pull_request' ]]; then if [[ $TRAVIS_BRANCH == *'release'* ]]; then - if [[ ! $current_version =~ ^(.+dev|.+prod)$ || $BUMP_PART != 'release' ]]; then # assume the travis tag is major, minor, or patch to indicate how to increment echo "detected current version needs an additional bump before release"