Skip to content

Commit

Permalink
Revert changes to check_version.py
Browse files Browse the repository at this point in the history
Reverts #4552
  • Loading branch information
sharkykh committed Sep 6, 2018
1 parent 15ed4a9 commit 44396c6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/check_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
TRAVIS_PR_TARGET_BRANCH = os.environ['TRAVIS_BRANCH']
TRAVIS_PR_SOURCE_BRANCH = os.environ['TRAVIS_PULL_REQUEST_BRANCH']
TRAVIS_BUILD_DIR = os.environ['TRAVIS_BUILD_DIR']
TRAVIS_COMMIT_MESSAGE = os.environ['TRAVIS_COMMIT_MESSAGE']
else:
TRAVIS_PULL_REQUEST = '1234'
TRAVIS_PR_TARGET_BRANCH = 'master'
TRAVIS_PR_SOURCE_BRANCH = 'develop' # or 'release/release-0.2.3'
TRAVIS_BUILD_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
TRAVIS_COMMIT_MESSAGE = 'whatever' # or have [disable-version-check] to disable this check

TRAVIS_PR_TARGET_BRANCH = TRAVIS_PR_TARGET_BRANCH.lower()
TRAVIS_PR_SOURCE_BRANCH = TRAVIS_PR_SOURCE_BRANCH.lower()
Expand Down Expand Up @@ -61,14 +59,12 @@ def search_file_for_version():
return Version(match[0])


if '[disable-version-check]' in TRAVIS_COMMIT_MESSAGE:
print('Skipping version check due to commit message.')
# Are we merging either develop or a release branch into master in a pull request?
elif all((
if all((
TRAVIS_PULL_REQUEST != 'false',
TRAVIS_PR_TARGET_BRANCH == 'master',
TRAVIS_PR_SOURCE_BRANCH == 'develop' or TRAVIS_PR_SOURCE_BRANCH.startswith('release/')
)):
)):
# Get lastest git tag on master branch
proc = subprocess.call(['git', 'fetch', 'origin', 'master:master'])
if proc > 0:
Expand Down

0 comments on commit 44396c6

Please sign in to comment.