|
20 | 20 | InvalidCommandArgumentError, |
21 | 21 | NoCommandFoundError, |
22 | 22 | ) |
| 23 | +from commitizen.version_increment import VersionIncrement |
23 | 24 |
|
24 | 25 | logger = logging.getLogger(__name__) |
25 | 26 |
|
@@ -505,54 +506,79 @@ def __call__( |
505 | 506 | { |
506 | 507 | "name": ["version"], |
507 | 508 | "description": ( |
508 | | - "get the version of the installed commitizen or the current project" |
509 | | - " (default: installed commitizen)" |
| 509 | + "Shows version of Commitizen or the version of the current project. " |
| 510 | + "Combine with other options to simulate the version increment process and play with the selected version scheme. " |
| 511 | + "If no arguments are provided, just show the installed Commitizen version." |
510 | 512 | ), |
511 | 513 | "help": ( |
512 | | - "get the version of the installed commitizen or the current project" |
513 | | - " (default: installed commitizen)" |
| 514 | + "Shows version of Commitizen or the version of the current project. " |
| 515 | + "Combine with other options to simulate the version increment process and play with the selected version scheme." |
514 | 516 | ), |
515 | 517 | "func": commands.Version, |
516 | 518 | "arguments": [ |
517 | 519 | { |
518 | 520 | "name": ["-r", "--report"], |
519 | | - "help": "get system information for reporting bugs", |
| 521 | + "help": "Get system information for reporting bugs", |
520 | 522 | "action": "store_true", |
521 | 523 | "exclusive_group": "group1", |
522 | 524 | }, |
523 | 525 | { |
524 | 526 | "name": ["-p", "--project"], |
525 | | - "help": "get the version of the current project", |
| 527 | + "help": "Get the version of the current project", |
526 | 528 | "action": "store_true", |
527 | 529 | "exclusive_group": "group1", |
528 | 530 | }, |
529 | 531 | { |
530 | 532 | "name": ["-c", "--commitizen"], |
531 | | - "help": "get the version of the installed commitizen", |
| 533 | + "help": "Get the version of the installed commitizen", |
532 | 534 | "action": "store_true", |
533 | 535 | "exclusive_group": "group1", |
534 | 536 | }, |
535 | 537 | { |
536 | 538 | "name": ["-v", "--verbose"], |
537 | 539 | "help": ( |
538 | | - "get the version of both the installed commitizen " |
| 540 | + "Get the version of both the installed commitizen " |
539 | 541 | "and the current project" |
540 | 542 | ), |
541 | 543 | "action": "store_true", |
542 | 544 | "exclusive_group": "group1", |
543 | 545 | }, |
544 | 546 | { |
545 | 547 | "name": ["--major"], |
546 | | - "help": "get just the major version. Need to be used with --project or --verbose.", |
| 548 | + "help": "Output the major version only. Need to be used with MANUAL_VERSION, --project or --verbose.", |
547 | 549 | "action": "store_true", |
548 | 550 | "exclusive_group": "group2", |
549 | 551 | }, |
550 | 552 | { |
551 | 553 | "name": ["--minor"], |
552 | | - "help": "get just the minor version. Need to be used with --project or --verbose.", |
| 554 | + "help": "Output the minor version only. Need to be used with MANUAL_VERSION, --project or --verbose.", |
553 | 555 | "action": "store_true", |
554 | 556 | "exclusive_group": "group2", |
555 | 557 | }, |
| 558 | + { |
| 559 | + "name": ["--patch"], |
| 560 | + "help": "Output the patch version only. Need to be used with MANUAL_VERSION, --project or --verbose.", |
| 561 | + "action": "store_true", |
| 562 | + "exclusive_group": "group2", |
| 563 | + }, |
| 564 | + { |
| 565 | + "name": ["--next"], |
| 566 | + "help": "Output the next version.", |
| 567 | + "type": str, |
| 568 | + "nargs": "?", |
| 569 | + "default": None, |
| 570 | + "const": "USE_GIT_COMMITS", |
| 571 | + "choices": ["USE_GIT_COMMITS"] |
| 572 | + + [str(increment) for increment in VersionIncrement], |
| 573 | + "exclusive_group": "group2", |
| 574 | + }, |
| 575 | + { |
| 576 | + "name": "manual_version", |
| 577 | + "type": str, |
| 578 | + "nargs": "?", |
| 579 | + "help": "Use the version provided instead of the version from the project. Can be used to test the selected version scheme.", |
| 580 | + "metavar": "MANUAL_VERSION", |
| 581 | + }, |
556 | 582 | ], |
557 | 583 | }, |
558 | 584 | ], |
|
0 commit comments