Fix - changed format of version string in pyproject.toml

Since Poetry 1.2 version in .toml must follow PEP-440, in our case there must not be dash sign. Plus sign is valid though.

Version in pyproject.toml is not used anywhere yet (only maybe when uploading wheel to pip, which is not really used).
This commit is contained in:
Petr Kalis 2022-09-01 18:12:16 +02:00
parent a515e58196
commit d90f9fb5b8
2 changed files with 2 additions and 2 deletions

View file

@ -101,7 +101,7 @@ def bump_file_versions(version):
# bump pyproject.toml
filename = "pyproject.toml"
regex = "version = \"(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-((0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?\" # OpenPype"
regex = "version = \"(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(+((0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?\" # OpenPype"
pyproject_version = f"version = \"{version}\" # OpenPype"
file_regex_replace(filename, regex, pyproject_version)