|
3 | 3 |
|
4 | 4 | The following preparation steps are executed: |
5 | 5 |
|
6 | | -- update version numbers in _version.py and setup.py |
| 6 | +- update version numbers in _version.py and pyproject.toml |
7 | 7 | - purge the "Unreleased" section of CHANGELOG.md and rename it to the new version number |
8 | 8 |
|
9 | 9 | All changes are immediately commited to the repository. |
@@ -117,10 +117,10 @@ def update_version(nvn): |
117 | 117 | return update_file(file_with_version, regex, nvn) |
118 | 118 |
|
119 | 119 |
|
120 | | -def update_setup(new_version_number): |
121 | | - """Update the setup.py file""" |
122 | | - file_with_version = "setup.py" |
123 | | - regex = r"(^\s+version\s*=\s*[\'\"]).*([\'\"]\s*,\s*$)" |
| 120 | +def update_pyproject(new_version_number): |
| 121 | + """Update the pyproject.toml file""" |
| 122 | + file_with_version = "pyproject.toml" |
| 123 | + regex = r"(^version\s*=\s*[\'\"]).*([\'\"]\s*$)" |
124 | 124 | return update_file(file_with_version, regex, new_version_number) |
125 | 125 |
|
126 | 126 |
|
@@ -211,7 +211,7 @@ def prepare_new_release(level): |
211 | 211 | raise |
212 | 212 | new_version_number = bump_version_number(last_version_number, level) |
213 | 213 |
|
214 | | - update_setup(new_version_number).gitadd() |
| 214 | + update_pyproject(new_version_number).gitadd() |
215 | 215 | update_version(new_version_number).gitadd() |
216 | 216 | update_changelog(new_version_number).gitadd() |
217 | 217 |
|
|
0 commit comments