Skip to content

Commit

Permalink
Merge pull request #59 from ww-tech/fix-travis-regex
Browse files Browse the repository at this point in the history
update TRAVIS_TAG to trigger deployments
  • Loading branch information
Kevin Zecchini authored Jan 10, 2020
2 parents 1edfeac + a38cf10 commit c12e642
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions scripts/bump_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit c12e642

Please sign in to comment.