Repository navigation
Commit fdec4ae
authored
When next_version("prerelease", prerelease_token="rc") is called on a
version that already has a prerelease with a different token (e.g. dev),
bump_prerelease() ignores the token argument and simply increments the
existing counter. 1.2.4-dev.1 becomes 1.2.4-dev.2 instead of 1.2.4-rc.1.
Fix: before delegating to bump_prerelease, check whether the existing
prerelease token matches the requested one. When they differ, replace
the prerelease directly with "{prerelease_token}.1".
1 parent 4e09ef0 commit fdec4ae
2 files changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
485 | 489 | | |
486 | 490 | | |
487 | 491 | | |
| |||
0 commit comments