Skip to content
This repository was archived by the owner on Dec 17, 2022. It is now read-only.

Commit 0619a59

Browse files
committed
Fix regex for parsing version from GITHUB_REF
1 parent 12f1692 commit 0619a59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def parse_requirements(filename: str) -> List[str]:
2020
name="bitlyshortener",
2121
author="Ouroboros Chrysopoeia",
2222
author_email="[email protected]",
23-
version=cast(Match, re.fullmatch(r"refs/tags/v(?P<ver>\S+)", os.environ["GITHUB_REF"]))["ver"], # Ex: GITHUB_REF="refs/tags/v1.2.3"; version="1.2.3"
23+
version=cast(Match, re.fullmatch(r"refs/tags/v?(?P<ver>\S+)", os.environ["GITHUB_REF"]))["ver"], # Ex: GITHUB_REF="refs/tags/1.2.3"; version="1.2.3"
2424
description="High-volume Bitly V4 URL shortener with memory-cache",
2525
keywords="bitly url shortener",
2626
long_description=(_DIR / "README.md").read_text().strip(),

0 commit comments

Comments
 (0)