Skip to content

Commit 2294a9f

Browse files
fix: keep release version updates scoped
1 parent 7003cff commit 2294a9f

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

.releaserc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
[
1313
"@semantic-release/exec",
1414
{
15-
"prepareCmd": "python -c \"import re, pathlib; p=pathlib.Path('pyproject.toml'); p.write_text(re.sub(r'version = \\\"[^\\\"]+\\\"', f'version = \\\"${nextRelease.version}\\\"', p.read_text()))\""
15+
"prepareCmd": "python -c \"import re, pathlib; files=[('pyproject.toml', r'(?m)^version = \\\"[^\\\"]+\\\"$', 'version = \\\"${nextRelease.version}\\\"'), ('src/archunitpython/__init__.py', r'(?m)^__version__ = \\\"[^\\\"]+\\\"$', '__version__ = \\\"${nextRelease.version}\\\"')]; [pathlib.Path(path).write_text(re.sub(pattern, replacement, pathlib.Path(path).read_text())) for path, pattern, replacement in files]\""
1616
}
1717
],
1818
[
1919
"@semantic-release/git",
2020
{
21-
"assets": ["pyproject.toml", "CHANGELOG.md"],
21+
"assets": ["pyproject.toml", "src/archunitpython/__init__.py", "CHANGELOG.md"],
2222
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
2323
}
2424
],

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Releases are fully automated. When a PR is merged to `main`:
3636
1. CI runs lint + type checking + tests (across Python 3.10-3.13)
3737
2. If CI passes, [semantic-release](https://github.com/semantic-release/semantic-release) analyzes commit messages since the last release
3838
3. If there are `fix:` or `feat:` commits, it automatically:
39-
- Bumps the version in `pyproject.toml`
39+
- Bumps the version in `pyproject.toml` and `src/archunitpython/__init__.py`
4040
- Updates `CHANGELOG.md`
4141
- Publishes to PyPI
4242
- Creates a GitHub release with release notes

tests/integration/test_e2e.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def test_import_format_violations(self):
5252
def test_version(self):
5353
import archunitpython
5454

55-
assert archunitpython.__version__ == "1.1.0"
55+
assert archunitpython.__version__
5656

5757

5858
class TestAssertPasses:

tests/test_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
def test_import():
88
import archunitpython
99

10-
assert archunitpython.__version__ == "1.1.0"
10+
assert archunitpython.__version__
1111

1212

1313
def test_project_version_matches_package_version():

0 commit comments

Comments
 (0)