Repository navigation
Commit 6cb1cae
committed
fix: next_version should bump version for build-only versions
next_version('patch') on a version with build metadata but no prerelease
(e.g. 1.2.3+build.5) would strip the build and return the same version
(1.2.3) instead of bumping the patch (1.2.4).
The condition in next_version was (version.prerelease or version.build),
which caused build-only versions to enter the 'finalization' path meant
for prereleases. Build metadata does not affect version precedence, so
its presence should not trigger version finalization.
Change the condition to only check version.prerelease.1 parent 9c19156 commit 6cb1cae
2 files changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
474 | | - | |
| 474 | + | |
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
201 | 211 | | |
202 | 212 | | |
203 | 213 | | |
| |||
0 commit comments