Skip to content

Commit

Permalink
gen_changelog: Use branch if no tag is present
Browse files Browse the repository at this point in the history
  • Loading branch information
sfalexrog committed Aug 13, 2019
1 parent 6f06e3e commit 2dbc176
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gen_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

try:
current_tag = os.environ['TRAVIS_TAG']
if current_tag == '':
current_tag = 'HEAD'
if current_tag == '' or current_tag == 'HEAD':
current_tag = os.environ['TRAVIS_BRANCH']
upload_changelog = False
print('TRAVIS_TAG is set to {}'.format(current_tag))
except KeyError:
print('TRAVIS_TAG not set - not uploading changelog')
print("TRAVIS_TAG not set, setting current_tag to HEAD")
current_tag = 'HEAD'
upload_changelog = False

Expand All @@ -34,7 +34,7 @@
repo_slug = ''
exit(1)

repo_owner = repo_slug.split()[0]
repo_owner = repo_slug.split('/')[0]
print('Repo owner is set to {}'.format(repo_owner))

if len(sys.argv) > 1:
Expand Down

0 comments on commit 2dbc176

Please sign in to comment.