Fix the automatic version increment in `__init__.py`
Marco Ricci

Marco Ricci commited on 2025-08-03 20:45:21
Zeige 2 geänderte Dateien mit 7 Einfügungen und 1 Löschungen.


Despite using software (`bump-my-version`) to automatically update all
version number references throughout the project, I forgot to include
a rule to update the version recorded in the code itself:
`derivepassphrase/__init__.py:__version__`.  Thus, version 0.5 and
version 0.5.1 have been released while both claiming to be version "0.5
alpha 1 (development build 1)".  Oops.
... ...
@@ -181,6 +181,12 @@ optional_value = ''
181 181
 values = []
182 182
 first_value = '1'
183 183
 
184
+[[tool.bumpversion.files]]
185
+filename = 'src/derivepassphrase/__init__.py'
186
+search = '^ *__version__ *= *"{current_version}"'
187
+replace = '__version__ = "{new_version}"'
188
+regex = true
189
+
184 190
 [[tool.bumpversion.files]]
185 191
 glob = 'src/derivepassphrase/*.py'
186 192
 search = '# SPDX-FileCopyrightText: \d\d\d\d'
... ...
@@ -9,5 +9,5 @@ __distribution_name__ = 'derivepassphrase'
9 9
 
10 10
 # Automatically generated.  DO NOT EDIT! Use importlib.metadata instead
11 11
 # to query the correct values.
12
-__version__ = '0.5a1.dev1'
12
+__version__ = '0.5.1'
13 13
 # END automatically generated.
14 14