refactor(changelog): change version flag shorthand to uppercase V
Update the shorthand from "v" to "V" in the changelog command and adjust the corresponding test assertion.
This commit is contained in:
parent
162504fa88
commit
5f93b43cd6
@ -21,7 +21,7 @@ var changelogCmd = &cobra.Command{
|
||||
|
||||
func init() {
|
||||
changelogCmd.Flags().String("since", "", "Start from this tag/ref (default: previous tag)")
|
||||
changelogCmd.Flags().StringP("version", "v", "", "Override version for header (default: latest git tag)")
|
||||
changelogCmd.Flags().StringP("version", "V", "", "Override version for header (default: latest git tag)")
|
||||
changelogCmd.Flags().Bool("stdout", false, "Print ONLY the new section (ideal for Gitea release notes)")
|
||||
changelogCmd.Flags().Bool("commit", false, "After writing, remind to run grokkit commit")
|
||||
rootCmd.AddCommand(changelogCmd)
|
||||
|
||||
@ -95,7 +95,7 @@ func TestChangelogCmd_Flags(t *testing.T) {
|
||||
|
||||
versionFlag := changelogCmd.Flags().Lookup("version")
|
||||
require.NotNil(t, versionFlag)
|
||||
assert.Equal(t, "v", versionFlag.Shorthand)
|
||||
assert.Equal(t, "V", versionFlag.Shorthand)
|
||||
|
||||
commitFlag := changelogCmd.Flags().Lookup("commit")
|
||||
require.NotNil(t, commitFlag)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user