Skip to content

Commit

Permalink
Merge branch 'morosi-version' into 'master'
Browse files Browse the repository at this point in the history
Remove dev1 from VERSION

See merge request it/e3-aws!30
  • Loading branch information
adanaja committed Dec 9, 2024
2 parents 9939c5e + 9188a86 commit 2e4d227
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.4.dev1
22.4
16 changes: 8 additions & 8 deletions build_wheel.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env python
"""Build the wheel.
Patch version in the version of the package is automatically replaced by
the number of commits since the last tagged version.
The number of commits since the last tagged version is automatically
added to the version of the package as the patch version.
For that, a tag v<major>.<minor>.0 must be manually added when a major or
minor version change occurs.
For that, a tag v<major>.<minor>.0 must be manually added after the
merge when a major or minor version change occurs.
"""
from __future__ import annotations
import sys
Expand Down Expand Up @@ -65,11 +65,12 @@ def main() -> None:
with open(version_path) as f:
version_content = f.read()

# Extract the <major>.<minor>.<patch> part.
# Extract the <major>.<minor>(.<patch>)? part.
# We will replace the patch version by the number of commits since the most
# recent tagged version
match = re.search(
r"(?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\w+))?", version_content
r"(?P<version>(?P<major>\d+)\.(?P<minor>\d+)(\.\w+)?)",
version_content,
)
if not match:
logger.error(
Expand All @@ -79,8 +80,7 @@ def main() -> None:

version_major = match.group("major")
version_minor = match.group("minor")
version_patch = match.group("patch")
version = f"{version_major}.{version_minor}.{version_patch}"
version = match.group("version")
logger.info(f"Version is {version}")

# Find previous version from the most recent tag
Expand Down

0 comments on commit 2e4d227

Please sign in to comment.