diff --git a/install-pdm.py b/install-pdm.py index 3107702914..3c1a8be3cd 100644 --- a/install-pdm.py +++ b/install-pdm.py @@ -202,7 +202,7 @@ def _get_latest_version(self) -> str: metadata = json.load(resp) def version_okay(v: str) -> bool: - return self.prerelease or all(p.isdigit() for p in v.split(".")) + return self.prerelease or re.fullmatch(r"^(\d+)\.(\d+)\.(\d+)(\.(post\d+))?", v) def sort_version(v: str) -> tuple: parts = [] diff --git a/install-pdm.py.sha256 b/install-pdm.py.sha256 index a67ad8130c..1ad1db58f0 100644 --- a/install-pdm.py.sha256 +++ b/install-pdm.py.sha256 @@ -1 +1 @@ -07dacbddc508f70bc21347598b9764bc07440ebface340bdd1e96f7af9ea4267 install-pdm.py +cd45cd6313c1cd0375d8b98b4adbc4f58b490c8e5c1e5b41b5b94d07e85d91e0 install-pdm.py