feat: add c-macro style version definition support to `version_variables` by codejedi365 · Pull Request #1349 · python-semantic-release/python-semantic-release
Expand Up
@@ -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, Expand Down Expand Up @@ -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 Expand Down
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, Expand Down Expand Up @@ -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 Expand Down