chore: update bump_version script
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
+9
-3
@@ -1,8 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# /// script
|
||||
# dependencies = ["click", "packaging"]
|
||||
# ///
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import configparser
|
||||
import glob
|
||||
import os
|
||||
import subprocess
|
||||
@@ -13,8 +18,6 @@ from pathlib import Path
|
||||
import click
|
||||
from packaging.version import InvalidVersion, Version
|
||||
|
||||
import cibuildwheel
|
||||
|
||||
config = [
|
||||
# file path, version find/replace format
|
||||
("README.md", "cibuildwheel=={}"),
|
||||
@@ -34,7 +37,10 @@ OFF = "\u001b[0m"
|
||||
|
||||
@click.command()
|
||||
def bump_version() -> None:
|
||||
current_version = cibuildwheel.__version__
|
||||
# Update if moving setup.cfg to pyproject.toml
|
||||
cfg = configparser.ConfigParser()
|
||||
cfg.read("setup.cfg")
|
||||
current_version = cfg["metadata"]["version"]
|
||||
|
||||
try:
|
||||
commit_date_str = subprocess.run(
|
||||
|
||||
Reference in New Issue
Block a user