From 2dbc176dbef5d672f98ac76c990e3a2316d8bda4 Mon Sep 17 00:00:00 2001 From: sfalexrog Date: Tue, 13 Aug 2019 19:13:00 +0300 Subject: [PATCH] gen_changelog: Use branch if no tag is present --- gen_changelog.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gen_changelog.py b/gen_changelog.py index afad496ea53d..404e935a68c4 100644 --- a/gen_changelog.py +++ b/gen_changelog.py @@ -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 @@ -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: