Skip to content

Commit

Permalink
chore: update bump_version script
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii committed May 12, 2024
1 parent 6dd4f15 commit 3873a1e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions bin/bump_version.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/usr/bin/env python3

# /// script
# dependencies = ["click", "packaging"]
# ///


from __future__ import annotations

import configparser
import glob
import os
import subprocess
Expand All @@ -13,8 +18,6 @@
import click
from packaging.version import InvalidVersion, Version

import cibuildwheel

config = [
# file path, version find/replace format
("README.md", "cibuildwheel=={}"),
Expand All @@ -34,7 +37,10 @@

@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(
Expand Down

0 comments on commit 3873a1e

Please sign in to comment.