Commit f76724d
committed
Abort prepare-release command when version on current branch is not incremented
Ensure version on current branch is updated by prepare-release command
When the next version for the current branch is set by the user using
the '--nextVersion' command line parameter, the next version might be
equal to the current version.
In that case no commit is created (no changes on the branch), which in
turn causes the current branch to be fast-forwarded to the commit on
the newly-created release branch when the branches are merged.
To prevent this error, abort command if both versions match (there is
already a check in place that prevents the version from being decremented).
The check only applies to the current branch because the version on the
release branch not being incremented is a valid use case.1 parent a6d49f3 commit f76724d
File tree
3 files changed
+33
-1
lines changed- src
- NerdBank.GitVersioning.Tests
- NerdBank.GitVersioning
- nbgv
3 files changed
+33
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
| 395 | + | |
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
401 | 419 | | |
402 | 420 | | |
403 | 421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| |||
273 | 278 | | |
274 | 279 | | |
275 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
276 | 289 | | |
277 | 290 | | |
278 | 291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
736 | 736 | | |
737 | 737 | | |
738 | 738 | | |
| 739 | + | |
739 | 740 | | |
740 | 741 | | |
741 | 742 | | |
| |||
0 commit comments