Skip to content

Commit e41cee0

Browse files
authored
[NEW] Python Project Generator v2.6.2
Release v2.6.2
2 parents 156ac47 + 133336f commit e41cee0

File tree

6 files changed

+65
-12
lines changed

6 files changed

+65
-12
lines changed

CHANGELOG.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@ Changelog
33
=========
44

55

6+
2.6.2 (2025-05-17)
7+
==================
8+
9+
Changes
10+
^^^^^^^
11+
12+
chore
13+
"""""
14+
- sem ver bump to 2.6.2
15+
- add try/catch with 3 retries for 'auto merge'
16+
- improve terminal based release script
17+
18+
619
2.6.1 (2025-05-16)
720
==================
821

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Build Status](https://img.shields.io/github/actions/workflow/status/boromir674/cookiecutter-python-package/test.yaml?link=https%3A%2F%2Fgithub.com%2Fboromir674%2Fcookiecutter-python-package%2Factions%2Fworkflows%2Ftest.yaml%3Fquery%3Dbranch%253Amaster)](https://github.com/boromir674/cookiecutter-python-package/actions/workflows/test.yaml?query=branch%3Amaster) [![Coverage](https://img.shields.io/codecov/c/github/boromir674/cookiecutter-python-package/master?logo=codecov)](https://app.codecov.io/gh/boromir674/cookiecutter-python-package) [![Docs](https://img.shields.io/readthedocs/python-package-generator/master?logo=readthedocs&logoColor=lightblue)](https://python-package-generator.readthedocs.io/en/master/) [![Maintainability](https://api.codeclimate.com/v1/badges/1d347d7dfaa134fd944e/maintainability)](https://codeclimate.com/github/boromir674/cookiecutter-python-package/maintainability)
44
[![Release Version](https://img.shields.io/pypi/v/cookiecutter_python)](https://pypi.org/project/cookiecutter-python/) [![Wheel](https://img.shields.io/pypi/wheel/cookiecutter-python?color=green&label=wheel)](https://pypi.org/project/cookiecutter-python) [![Tech Debt](https://img.shields.io/codeclimate/tech-debt/boromir674/cookiecutter-python-package)](https://codeclimate.com/github/boromir674/cookiecutter-python-package/) [![Codacy](https://app.codacy.com/project/badge/Grade/5be4a55ff1d34b98b491dc05e030f2d7)](https://app.codacy.com/gh/boromir674/cookiecutter-python-package/dashboard?utm_source=github.com&utm_medium=referral&utm_content=boromir674/cookiecutter-python-package&utm_campaign=Badge_Grade)
55
[![Supported Versions](https://img.shields.io/pypi/pyversions/cookiecutter-python?color=blue&label=python&logo=python&logoColor=%23ccccff)](https://pypi.org/project/cookiecutter-python)
6-
[![PyPI Stats](https://img.shields.io/pypi/dm/cookiecutter-python?logo=pypi&logoColor=%23849ED9&color=%23849ED9)](https://pypistats.org/packages/cookiecutter-python) [![Commits Since Tag](https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v2.6.1/master?color=blue&logo=github)](https://github.com/boromir674/cookiecutter-python-package/compare/v2.6.1..master) [![Commits Since Release](https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/latest?color=blue&logo=semver&sort=semver)](https://github.com/boromir674/cookiecutter-python-package/releases)
6+
[![PyPI Stats](https://img.shields.io/pypi/dm/cookiecutter-python?logo=pypi&logoColor=%23849ED9&color=%23849ED9)](https://pypistats.org/packages/cookiecutter-python) [![Commits Since Tag](https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v2.6.2/master?color=blue&logo=github)](https://github.com/boromir674/cookiecutter-python-package/compare/v2.6.2..master) [![Commits Since Release](https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/latest?color=blue&logo=semver&sort=semver)](https://github.com/boromir674/cookiecutter-python-package/releases)
77
[![License](https://img.shields.io/github/license/boromir674/cookiecutter-python-package)](https://github.com/boromir674/cookiecutter-python-package/blob/master/LICENSE) [![OpenSSF](https://bestpractices.coreinfrastructure.org/projects/5988/badge)](https://bestpractices.coreinfrastructure.org/en/projects/5988) [![Ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://docs.astral.sh/ruff/) [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
88

99

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ build-backend = "poetry.core.masonry.api"
1414
name = "cookiecutter_python"
1515
### ... ###
1616

17-
version = "2.6.1"
17+
version = "2.6.2"
1818
description = "1-click Generator of Python Project, from Template with streamlined \"DevOps\" using a powerful CI/CD Pipeline."
1919
readme = "README.md"
2020
license = "AGPL-3.0-only"
@@ -74,7 +74,7 @@ maintainers = [
7474
license = {text = "AGPL-3.0-only"}
7575

7676
name = "cookiecutter_python"
77-
version = "2.6.1"
77+
version = "2.6.2"
7878
description = "1-click Generator of Python Project, from Template with streamlined \"DevOps\" using a powerful CI/CD Pipeline."
7979
readme = "README.md"
8080
# keywords = []

scripts/terminal-based-release.sh

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
#!/usr/bin/env bash
22

3-
# RUN THIS, WHEN All changes for Release are on the dev branch
3+
### Part of Release Process ###
4+
5+
# Topic_A, Topic_B, ... , Topic_N
6+
# \ | /
7+
# \ | /
8+
# \ | /
9+
# \ | /
10+
# Integration_Br
11+
# |
12+
# Release_Br
13+
# |
14+
# Default_Br
15+
16+
# RUN THIS, WHEN All changes for Release are ALREADY on the Integration_Br branch
17+
418

519
## CONFIGURATION
620
### 1. SEM VER SOURCE UPDATE ###
@@ -21,7 +35,8 @@ DEFAULT_BRANCH=${_MAIN}
2135

2236
# INPUTS
2337
# 1. NEW_VERSION: The new version to be released
24-
# 2. DEV (Optional): The branch where all changes merge too, initially
38+
# 2. Branch with Changes DEV (Optional): The branch where all changes for release are, initially
39+
# 3. Branch
2540

2641
# USAGE
2742
# ./terminal-based-release.sh <NEW_VERSION> [<DEV>]
@@ -93,8 +108,7 @@ echo =======
93108
# Press any key to continue dialog .. (unless ctrl + C)
94109
read -ep "Press any key to commit!" -n1 -s
95110

96-
# read -tn $'Press any key to continue dialog .. (unless ctrl + C)\n'
97-
111+
### 1.a Commit the changes
98112
git commit -m "chore: sem ver bump to ${NEW_VERSION}"
99113

100114

@@ -124,6 +138,7 @@ echo =======
124138
# Dialog before Commit
125139
read -ep "Press any key to commit '${CHANGELOG_FILE}' !" -n1 -s
126140

141+
### 2.a Commit the changes
127142
git commit -m "docs: add ${NEW_VERSION} Release entry in ${CHANGELOG_FILE}"
128143

129144
echo
@@ -132,35 +147,59 @@ echo "DONE !"
132147
echo
133148
read -ep "Press any key to push changes to ${BRANCH_WITH_CHANGES} remote!" -n1 -s
134149

150+
## PUSH Integration_Br (dev) TO REMOTE
135151
git push
136152

137153
git checkout ${RELEASE_BR}
138154
git rebase ${DEFAULT_BRANCH}
139155
git push
140156

141157
git checkout "${BRANCH_WITH_CHANGES}"
158+
159+
## OPEN PR TO RELEASE BRANCH
142160
gh pr create --base ${RELEASE_BR} --head "${BRANCH_WITH_CHANGES}" --title "Release v${NEW_VERSION}"
143161

144-
gh pr merge ${BRANCH_WITH_CHANGES} --merge --auto
145162

163+
## ENABLE AUTO MERGE with 'merge' strategy (others are 'squash' and 'rebase')
164+
# this cmd 'gh pr merge ${BRANCH_WITH_CHANGES} --merge --auto' randomly exits with error code 1.
165+
# need to "catch" and retry untill success (max retried = 3)
166+
167+
set +e
168+
gh pr merge "${BRANCH_WITH_CHANGES}" --merge --auto
169+
if [ $? -ne 0 ]; then
170+
echo "gh pr merge ${BRANCH_WITH_CHANGES} --merge --auto failed, retrying..."
171+
for i in {1..3}; do
172+
gh pr merge "${BRANCH_WITH_CHANGES}" --merge --auto
173+
if [ $? -eq 0 ]; then
174+
break
175+
fi
176+
done
177+
fi
178+
set -e
179+
180+
181+
## WATCH GITHUB ACTIONS WORKFLOWS RUNNING
182+
echo "========== Watch GH Workflow Run =========="
146183
gh run watch
147184

148185
echo "========================="
149186
echo "DONE! PR ${BRANCH_WITH_CHANGES} --> ${RELEASE_BR} Merged !"
150187

151-
# Update Local Release Branch
152188
git checkout ${RELEASE_BR}
153189

154190
echo
155191
read -ep "Press any key to update local '${RELEASE_BR}' branch from remote!" -n1 -s
156192

193+
## PULL RELEASE BRANCH
157194
git pull
158195

196+
## CREATE PR TO DEFAULT_BRANCH (ie release --> main)
159197
gh pr create --base ${DEFAULT_BRANCH} --head "${RELEASE_BR}" --title "Release v${NEW_VERSION}"
160198
echo
161199
read -ep "Press any key to make a RELEASE CANDIDATE '${RELEASE_BR}' branch from remote!" -n1 -s
162200

163-
RC_TAG="v${RELEASE_BR}-rc"
201+
## CREATE and PUSH RC TAG
202+
RC_TAG="v${NEW_VERSION}-rc"
164203

165204
git tag -f "$RC_TAG"
166205
git push origin -f "$RC_TAG"
@@ -176,6 +215,7 @@ read -ep "Please run 'gh run watch' to watch the CI/CD Pipeline (press any key t
176215
# read -ep "Please watch the CI/CD Pipeline to succeed (press any key to continue to 'live watch') !" -n1 -s
177216
# gh run watch
178217

218+
## PROMPT USER TO MERGE the PR if QA/CHECKS PASSED
179219
echo "========================="
180220
echo "Assuming CI/CD Pipeline Succeeded !"
181221

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = '2.6.1'
1+
__version__ = '2.6.2'
22

33
from . import _logging # noqa

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)