Skip to content

Commit 529c0f8

Browse files
committed
Improve testpypi
1 parent 01057ce commit 529c0f8

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

testpypi_prepublish.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,15 @@ def update_pyproject_toml() -> None:
2828
], text=True).strip()
2929

3030
print("Get commit count.")
31-
count = subprocess.check_output([
31+
count = int(subprocess.check_output([
3232
'git', 'rev-list', f'{tag}..HEAD', '--count',
33-
], text=True).strip()
33+
], text=True).strip())
3434

3535
print(f"Read: {VERSION_PY}")
3636
version_input = VERSION_PY.read_text()
37-
raw_version = re.search(
37+
version = Version(re.search(
3838
'^__version__\\s*=\\s*["\'](.+)["\']', version_input, re.M,
39-
).group(1)
40-
version = Version(raw_version)
39+
).group(1))
4140
if not version.is_postrelease:
4241
version = copy.replace(version, post=1)
4342

0 commit comments

Comments
 (0)