Skip to content

Commit 2d1a3a6

Browse files
committed
ci: fix regression in ci test-job.yml
1 parent 4c41360 commit 2d1a3a6

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

scripts/distro-sem-ver-bump.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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"

scripts/sem-ver-bump.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)