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

Commit

Permalink
Fix regex for parsing version from GITHUB_REF
Browse files Browse the repository at this point in the history
  • Loading branch information
impredicative committed Oct 12, 2020
1 parent 12f1692 commit 0619a59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def parse_requirements(filename: str) -> List[str]:
name="bitlyshortener",
author="Ouroboros Chrysopoeia",
author_email="impredicative@users.nomail.github.com",
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"
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"
description="High-volume Bitly V4 URL shortener with memory-cache",
keywords="bitly url shortener",
long_description=(_DIR / "README.md").read_text().strip(),
Expand Down

0 comments on commit 0619a59

Please sign in to comment.