File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed
Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+
3+ # POSIX-compliant shell script
4+
5+ VERSION=" ${1} "
6+
7+
8+ # # 1. Module Specific - Sem Ver
9+ VERSION_VAR=' __version__'
10+ INIT_FILE=' src/cookiecutter_python/__init__.py'
11+ sed -i.bak -E " s/(${VERSION_VAR} = ['\" ])[0-9]+\.[0-9]+\.[0-9]+(['\" ])/\\ 1${VERSION} \\ 2/" " ${INIT_FILE} " && rm " ${INIT_FILE} .bak"
12+
13+ # # 2. Python Poetry BUILD - Bound - Sem Ver
14+
15+ # Until uv migration is verified we must update all regex matches (ie for poetry and uv config sections!)
16+ PYPROJECT=' pyproject.toml'
17+ sed -i.bak -E " s/(version = ['\" ])[0-9]+\.[0-9]+\.[0-9]+(['\" ])/\\ 1${VERSION} \\ 2/" " ${PYPROJECT} " && rm " ${PYPROJECT} .bak"
Original file line number Diff line number Diff line change @@ -13,16 +13,8 @@ set -e
1313
1414
1515# # 1. Replace Sem Ver stored in __version__ python variable of src/cookiecutter_python/__init__.py module
16- VERSION_VAR=' __version__'
17- INIT_FILE=' src/cookiecutter_python/__init__.py'
18- sed -i.bak -E " s/(${VERSION_VAR} = ['\" ])[0-9]+\.[0-9]+\.[0-9]+(['\" ])/\\ 1${VERSION} \\ 2/" " ${INIT_FILE} " && rm " ${INIT_FILE} .bak"
19-
20-
2116# # 2. Replace Sem Ver mapped to 'version' field in pyproject.toml
22-
23- # Until uv migration is verified we must update all regex matches (ie for poetry and uv config sections!)
24- PYPROJECT=' pyproject.toml'
25- sed -i.bak -E " s/(version = ['\" ])[0-9]+\.[0-9]+\.[0-9]+(['\" ])/\\ 1${VERSION} \\ 2/" " ${PYPROJECT} " && rm " ${PYPROJECT} .bak"
17+ ./distro-sem-ver-bump.sh " ${VERSION} "
2618
2719
2820# # 3. Replace Ser Ver occurences in README.md
You can’t perform that action at this time.
0 commit comments