diff options
Diffstat (limited to 'release')
-rw-r--r-- | release/README.md | 2 | ||||
-rwxr-xr-x | release/cibuild.py | 16 |
2 files changed, 15 insertions, 3 deletions
diff --git a/release/README.md b/release/README.md index a34f1793..6f4e8f1a 100644 --- a/release/README.md +++ b/release/README.md @@ -36,7 +36,7 @@ release for! The command examples assume that you have a git remote called ## Docker - The docker image is built on Travis and pushed to Docker Hub automatically. - Please check https://hub.docker.com/r/mitmproxy/mitmproxy/tags/ about the latest version -- Update `latest` tag: `docker tag mitmproxy/mitmproxy:<version number here> mitmproxy/mitmproxy:latest && docker push mitmproxy/mitmproxy:latest` +- Update `latest` tag: `export VERSION=4.0.3 && docker pull mitmproxy/mitmproxy:$VERSION && docker tag mitmproxy/mitmproxy:$VERSION mitmproxy/mitmproxy:latest && docker push mitmproxy/mitmproxy:latest` ## Website - Update version here: diff --git a/release/cibuild.py b/release/cibuild.py index 76eb377e..37511086 100755 --- a/release/cibuild.py +++ b/release/cibuild.py @@ -196,13 +196,25 @@ class BuildEnviron: # For production releases, we require strict version equality if self.version != version: raise ValueError(f"Tag is {self.tag}, but mitmproxy/version.py is {version}.") - else: - # For snapshots, we only ensure that mitmproxy/version.py contains a dev release. + elif not self.is_maintenance_branch: + # Commits on maintenance branches don't need the dev suffix. This + # allows us to incorporate and test commits between tagged releases. + # For snapshots, we only ensure that mitmproxy/version.py contains a + # dev release. version_info = parver.Version.parse(version) if not version_info.is_devrelease: raise ValueError(f"Non-production releases must have dev suffix: {version}") @property + def is_maintenance_branch(self) -> bool: + """ + Is this an untagged commit on a maintenance branch? + """ + if not self.tag and self.branch and re.match(r"v\d+\.x", self.branch): + return True + return False + + @property def has_docker_creds(self) -> bool: return bool(self.docker_username and self.docker_password) |