From 5ca835f29c8111ea34227a15e0be06ad10464a03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Nov 2025 07:12:30 -0800 Subject: [PATCH 1/8] build(deps-test): relax `pytest-lazy-fixtures` version requirement to allow `1.4.0` (#1336) --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e5629a06e..a63b03943 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ test = [ "pytest-clarity ~= 1.0", "pytest-cov >= 5.0.0, < 7.0.0", "pytest-env ~= 1.0", - "pytest-lazy-fixtures ~= 1.3.4", + "pytest-lazy-fixtures ~= 1.4", "pytest-mock ~= 3.0", "pytest-order ~= 1.3", "pytest-pretty ~= 1.2", From 8877d8189b38a9be4f59f805d92d18fa95d2cc4b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Nov 2025 07:13:14 -0800 Subject: [PATCH 2/8] build(deps-test): expand `pytest-cov` dependency requirement to support `v7` (#1333) --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a63b03943..e27ba7ec1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ test = [ "pyyaml ~= 6.0", "pytest ~= 8.3", "pytest-clarity ~= 1.0", - "pytest-cov >= 5.0.0, < 7.0.0", + "pytest-cov >= 5.0.0, < 8.0.0", "pytest-env ~= 1.0", "pytest-lazy-fixtures ~= 1.4", "pytest-mock ~= 3.0", From e3ae8acb23114aff23e2f993b219a3e02bfdc500 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Nov 2025 08:02:26 -0800 Subject: [PATCH 3/8] build(deps-docs): bump `furo` theme version from ~=2024.1 to ~=2025.9 (#1337) --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e27ba7ec1..7e8442548 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ docs = [ "Sphinx ~= 6.0", "sphinxcontrib-apidoc == 0.5.0", "sphinx-autobuild == 2024.2.4", - "furo ~= 2024.1", + "furo ~= 2025.9", ] test = [ "coverage[toml] ~= 7.0", From 76c6f75b64edc4172d73a936930bd18b826411c0 Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sun, 2 Nov 2025 08:33:58 -0800 Subject: [PATCH 4/8] chore(scripts): add docs development script (#1350) --- scripts/watch_docs.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 scripts/watch_docs.sh diff --git a/scripts/watch_docs.sh b/scripts/watch_docs.sh new file mode 100644 index 000000000..e3608442e --- /dev/null +++ b/scripts/watch_docs.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +if command -v realpath >/dev/null 2>&1; then + PROJ_ROOT=$(realpath "$(dirname "${BASH_SOURCE[0]}")/..") +elif command -v readlink >/dev/null 2>&1; then + PROJ_ROOT=$(readlink -f "$(dirname "${BASH_SOURCE[0]}")/..") +else + PROJ_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) +fi + +[ -z "$VIRTUAL_ENV" ] && VIRTUAL_ENV=".venv" +SPHINX_AUTOBUILD_EXE="$VIRTUAL_ENV/bin/sphinx-autobuild" + +cd "$PROJ_ROOT" || exit 1 + +if [ ! -f "$SPHINX_AUTOBUILD_EXE" ]; then + printf '%s\n' "sphinx-autobuild is not installed in the virtual environment. Please install the docs extras." + exit 1 +fi + +rm -rf docs/_build/html docs/api/modules + +exec "$SPHINX_AUTOBUILD_EXE" docs docs/_build/html --open-browser --port 9000 --ignore docs/api/modules From 23b8a6c99ebb3872003f5784f1a51926c72c1d1e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Nov 2025 08:44:05 -0800 Subject: [PATCH 5/8] build(deps-docs): bump `sphinxcontrib-apidoc` from 0.5.0 to 0.6.0 (#1242) --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7e8442548..455646044 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ build = [ ] docs = [ "Sphinx ~= 6.0", - "sphinxcontrib-apidoc == 0.5.0", + "sphinxcontrib-apidoc == 0.6.0", "sphinx-autobuild == 2024.2.4", "furo ~= 2025.9", ] From 66cc9d1f867b51afa47b9990860cfcaa165a7d8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Nov 2025 09:54:59 -0800 Subject: [PATCH 6/8] build(deps-docs): bump `sphinx` dependency from ~=6.0.0 to ~=7.4.0 (#712) --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 455646044..45c9c2ea1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ build = [ "build ~= 1.2" ] docs = [ - "Sphinx ~= 6.0", + "Sphinx ~= 7.4", "sphinxcontrib-apidoc == 0.6.0", "sphinx-autobuild == 2024.2.4", "furo ~= 2025.9", From 4ce1fcac60ac73657a4aaaaa3cb7c4afc7eac2c1 Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sun, 2 Nov 2025 10:17:53 -0800 Subject: [PATCH 7/8] feat(cmd-version): adds c-macro style version definition support to `version_variables` (#1349) Implements: #1348 * docs(configuration): update `version_variables` examples with a c-macro style replacement * test(version-variables): add c-macro style version stamp unit test --- docs/configuration/configuration.rst | 6 ++- .../version/declarations/pattern.py | 4 +- .../declarations/test_pattern_declaration.py | 53 +++++++++++++++++++ 3 files changed, 60 insertions(+), 3 deletions(-) diff --git a/docs/configuration/configuration.rst b/docs/configuration/configuration.rst index 2b2278382..cdd3604fb 100644 --- a/docs/configuration/configuration.rst +++ b/docs/configuration/configuration.rst @@ -1354,7 +1354,8 @@ The regular expression generated from the ``version_variables`` definition will: 2. The variable name defined by ``variable`` and the version must be separated by an operand symbol (``=``, ``:``, ``:=``, or ``@``). Whitespace is optional around the symbol. As of v10.0.0, a double-equals (``==``) operator is also supported - as a valid operand symbol. + as a valid operand symbol. As of $NEW_RELEASE_TAG, PSR can omit all operands as long + as there is at least one whitespace character between the variable name and the version. 3. The value of the variable must match a `SemVer`_ regular expression and can be enclosed by single (``'``) or double (``"``) quotation marks but they must match. However, @@ -1410,6 +1411,9 @@ will be matched and replaced by the new version: # requirements.txt my-package == 1.2.3 + # C-Macro style (no operand only whitespace required) + #define VERSION "1.2.3" + .. important:: The Regular Expression expects a version value to exist in the file to be replaced. It cannot be an empty string or a non-semver compliant string. If this is the very diff --git a/src/semantic_release/version/declarations/pattern.py b/src/semantic_release/version/declarations/pattern.py index f08c208a4..4d285b5a1 100644 --- a/src/semantic_release/version/declarations/pattern.py +++ b/src/semantic_release/version/declarations/pattern.py @@ -228,8 +228,8 @@ def from_string_definition( # Negative lookbehind to ensure we don't match part of a variable name f"""(?x)(?P['"])?(?['"])?{value_replace_pattern_str}(?P=quote2)?""", ], diff --git a/tests/unit/semantic_release/version/declarations/test_pattern_declaration.py b/tests/unit/semantic_release/version/declarations/test_pattern_declaration.py index 8280e95bb..ddca3dbf6 100644 --- a/tests/unit/semantic_release/version/declarations/test_pattern_declaration.py +++ b/tests/unit/semantic_release/version/declarations/test_pattern_declaration.py @@ -215,6 +215,59 @@ def test_pattern_declaration_is_version_replacer(): """ ), ), + ( + "Using default number format for c-macro style definition (see #1348)", + f"{test_file}:APP_VERSION:{VersionStampType.NUMBER_FORMAT.value}", + # irrelevant for this case + lazy_fixture(default_tag_format_str.__name__), + # Uses colon separator with double quotes + dedent( + """\ + #ifndef VERSION_H + #define VERSION_H + + #define APP_VERSION "0.0.0" + + #endif // VERSION_H + """ + ), + dedent( + f"""\ + #ifndef VERSION_H + #define VERSION_H + + #define APP_VERSION "{next_version}" + + #endif // VERSION_H + """ + ), + ), + ( + "Using default tag format for c-macro style definition (see #1348)", + f"{test_file}:APP_VERSION:{VersionStampType.TAG_FORMAT.value}", + lazy_fixture(default_tag_format_str.__name__), + # Uses colon separator with double quotes + dedent( + """\ + #ifndef VERSION_H + #define VERSION_H + + #define APP_VERSION "v0.0.0" + + #endif // VERSION_H + """ + ), + dedent( + f"""\ + #ifndef VERSION_H + #define VERSION_H + + #define APP_VERSION "v{next_version}" + + #endif // VERSION_H + """ + ), + ), ] ], ) From 0f7386ff085425f29fd33e75b3fcf47274502b1f Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Sun, 2 Nov 2025 12:49:22 -0800 Subject: [PATCH 8/8] ci(deps): lock `pypa/gh-action-pypi-publish` action to sha-1 of `v1.13.0` (#1359) --- .github/workflows/cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index e3148a9fb..cb807c1b5 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -216,7 +216,7 @@ jobs: # see https://docs.pypi.org/trusted-publishers/ - name: Publish package distributions to PyPI id: pypi-publish - uses: pypa/gh-action-pypi-publish@v1.13.0 + uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 with: packages-dir: dist print-hash: true