Skip to content

Commit 217cf86

Browse files
committed
finalize script
1 parent 25b4705 commit 217cf86

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

.github/bump_for_release.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
def check_release_month(line: str, current_date: datetime.date):
88
current_month = current_date.strftime("%B").lower()[:3]
9-
month_match = re.search("month = {(?P<month>[a-z]{3})}", line)
9+
month_match = re.search("month = (?P<month>[a-z]{3})", line)
10+
if month_match is not None:
11+
print(month_match["month"])
1012
if month_match is not None and month_match["month"] != current_month:
1113
raise ValueError(
1214
f"Release month in README.md ({month_match['month']}) is not consistent with current month ({current_month}). Please update it."
@@ -40,13 +42,13 @@ def check_release_date():
4042
args = parser.parse_args()
4143
major, minor, patch = args.version
4244

43-
# os.system("git checkout main")
44-
# os.system("git pull")
45+
os.system("git checkout main")
46+
os.system("git pull")
4547

4648
check_release_date()
4749

48-
# new_branch = f"prepare-release-{major}.{minor}.{patch}"
49-
# os.system(f"git checkout -b {new_branch}")
50-
# os.system(f"bump2version --new-version {major}.{minor}.{patch} --commit .")
51-
# os.system(f"bump2version --new-version {major}.{minor + 1}.0.dev0 --commit .")
52-
# os.system(f"git push --set-upstream origin {new_branch}")
50+
new_branch = f"prepare-release-{major}.{minor}.{patch}"
51+
os.system(f"git checkout -b {new_branch}")
52+
os.system(f"bump2version --new-version {major}.{minor}.{patch} --commit .")
53+
os.system(f"bump2version --new-version {major}.{minor + 1}.0.dev0 --commit .")
54+
os.system(f"git push --set-upstream origin {new_branch}")

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,10 @@ If you are using this code for your own projects please cite our work:
379379
```bibtex
380380
@software{Ageron_Simulated_Bifurcation_SB_2023,
381381
author = {Ageron, Romain and Bouquet, Thomas and Pugliese, Lorenzo},
382+
month = apr,
382383
title = {{Simulated Bifurcation (SB) algorithm for Python}},
383384
url = {https://github.com/bqth29/simulated-bifurcation-algorithm},
384385
version = {2.1.0.dev0},
385-
month = apr,
386386
year = {2025},
387387
}
388388
```

0 commit comments

Comments
 (0)