diff options
author | Aldo Cortesi <aldo@corte.si> | 2018-06-16 10:17:59 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2018-06-16 10:23:33 +1200 |
commit | 85526e5370e32a93b7086648ece12c3bd5269db8 (patch) | |
tree | 175d372a194c9dea134e91294125417c61604fd3 /release | |
parent | bf791ba1d5fc7b06178e077c9e4b6583296eed07 (diff) | |
download | mitmproxy-85526e5370e32a93b7086648ece12c3bd5269db8.tar.gz mitmproxy-85526e5370e32a93b7086648ece12c3bd5269db8.tar.bz2 mitmproxy-85526e5370e32a93b7086648ece12c3bd5269db8.zip |
cibuild: Match Travis env variable behaviour
Whenever TRAVIS_TAG is non-empty, TRAVIS_BRANCH is over-ridden to match the
TRAVIS_TAG value. Adjust our tests to reflect this, and add a sanity check that
fails hard if this constraint is ever not met.
See https://github.com/travis-ci/travis-ci/issues/4745
Diffstat (limited to 'release')
-rwxr-xr-x | release/cibuild.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/release/cibuild.py b/release/cibuild.py index 734eaf39..76eb377e 100755 --- a/release/cibuild.py +++ b/release/cibuild.py @@ -63,6 +63,12 @@ class BuildEnviron: self.travis_tag = travis_tag self.travis_branch = travis_branch + + if travis_tag and travis_tag != travis_branch: + raise ValueError( + f"Something is wrong - TRAVIS_TAG={travis_tag}, but TRAVIS_BRANCH={travis_branch}" + ) + self.travis_pull_request = travis_pull_request self.should_build_wheel = should_build_wheel @@ -202,7 +208,7 @@ class BuildEnviron: @property def is_prod_release(self) -> bool: - if not self.tag: + if not (self.tag and self.tag.startswith("v")): return False try: v = parver.Version.parse(self.version, strict=True) |