Skip to content

Commit

Permalink
fix: correctly handle rc container names
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Spooren <mail@aparcar.org>
  • Loading branch information
aparcar committed Sep 21, 2023
1 parent b994d15 commit 76a10ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion asu/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def remove_prefix(text, prefix):


def get_container_version_tag(version: str) -> str:
if match(r"^\d+\.\d+\.\d+$", version):
if match(r"^\d+\.\d+\.\d+(-rc\d+)?$", version):
logging.debug("Version is a release version")
version: str = "v" + version
else:
Expand Down
1 change: 1 addition & 0 deletions tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def test_get_version_container_tag():
assert get_container_version_tag("1.0.0") == "v1.0.0"
assert get_container_version_tag("SNAPSHOT") == "master"
assert get_container_version_tag("1.0.0-SNAPSHOT") == "openwrt-1.0.0"
assert get_container_version_tag("23.05.0-rc3") == "v23.05.0-rc3"


def test_check_manifest():
Expand Down

0 comments on commit 76a10ea

Please sign in to comment.