We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dd4f15 commit 3873a1eCopy full SHA for 3873a1e
bin/bump_version.py
@@ -1,8 +1,13 @@
1
#!/usr/bin/env python3
2
3
+# /// script
4
+# dependencies = ["click", "packaging"]
5
+# ///
6
+
7
8
from __future__ import annotations
9
10
+import configparser
11
import glob
12
import os
13
import subprocess
@@ -13,8 +18,6 @@
18
import click
14
19
from packaging.version import InvalidVersion, Version
15
20
16
-import cibuildwheel
17
-
21
config = [
22
# file path, version find/replace format
23
("README.md", "cibuildwheel=={}"),
@@ -34,7 +37,10 @@
34
37
35
38
@click.command()
36
39
def bump_version() -> None:
- current_version = cibuildwheel.__version__
40
+ # Update if moving setup.cfg to pyproject.toml
41
+ cfg = configparser.ConfigParser()
42
+ cfg.read("setup.cfg")
43
+ current_version = cfg["metadata"]["version"]
44
45
try:
46
commit_date_str = subprocess.run(
0 commit comments