parent
bf0cd1bffd
commit
4dbdccfa43
|
@ -30,6 +30,7 @@ type action struct {
|
||||||
verbose bool
|
verbose bool
|
||||||
dryRun bool
|
dryRun bool
|
||||||
interactive bool
|
interactive bool
|
||||||
|
interactiveFrom bool
|
||||||
autoGitCommit bool
|
autoGitCommit bool
|
||||||
autoGitTag bool
|
autoGitTag bool
|
||||||
autoGitPush bool
|
autoGitPush bool
|
||||||
|
@ -77,6 +78,7 @@ func (a *action) getFlags(c *cli.Context) {
|
||||||
|
|
||||||
a.flags.dryRun = c.Bool(flagDryRunName)
|
a.flags.dryRun = c.Bool(flagDryRunName)
|
||||||
a.flags.interactive = c.Bool(flagInteractiveName)
|
a.flags.interactive = c.Bool(flagInteractiveName)
|
||||||
|
a.flags.interactiveFrom = c.Bool(flagInteractiveFromName)
|
||||||
a.flags.autoGitCommit = c.Bool(flagAutoGitCommitName)
|
a.flags.autoGitCommit = c.Bool(flagAutoGitCommitName)
|
||||||
a.flags.autoGitTag = c.Bool(flagAutoGitTagName)
|
a.flags.autoGitTag = c.Bool(flagAutoGitTagName)
|
||||||
a.flags.autoGitPush = c.Bool(flagAutoGitPushName)
|
a.flags.autoGitPush = c.Bool(flagAutoGitPushName)
|
||||||
|
|
|
@ -42,6 +42,11 @@ func (a *action) RunGenerate(c *cli.Context) error {
|
||||||
fmt.Printf("Input version (%s):\n", flagVersionUsage)
|
fmt.Printf("Input version (%s):\n", flagVersionUsage)
|
||||||
a.flags.version = ioe.ReadInput()
|
a.flags.version = ioe.ReadInput()
|
||||||
|
|
||||||
|
if a.flags.interactiveFrom {
|
||||||
|
fmt.Printf("Input from (%s):\n", flagFromUsage)
|
||||||
|
a.flags.from = ioe.ReadInputEmpty()
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Printf("Input to (%s):\n", flagToUsage)
|
fmt.Printf("Input to (%s):\n", flagToUsage)
|
||||||
a.flags.to = ioe.ReadInputEmpty()
|
a.flags.to = ioe.ReadInputEmpty()
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,9 @@ const (
|
||||||
flagInteractiveName = "interactive"
|
flagInteractiveName = "interactive"
|
||||||
flagInteractiveUsage = "interactive mode"
|
flagInteractiveUsage = "interactive mode"
|
||||||
|
|
||||||
|
flagInteractiveFromName = "interactive-from"
|
||||||
|
flagInteractiveFromUsage = "enable ask from in interactive mode"
|
||||||
|
|
||||||
flagAutoGitCommitName = "auto-commit"
|
flagAutoGitCommitName = "auto-commit"
|
||||||
flagAutoGitCommitUsage = "enable auto git commit after generating changelog"
|
flagAutoGitCommitUsage = "enable auto git commit after generating changelog"
|
||||||
|
|
||||||
|
@ -126,6 +129,10 @@ func NewApp() *App {
|
||||||
Usage: flagInteractiveUsage,
|
Usage: flagInteractiveUsage,
|
||||||
Aliases: flagInteractiveAliases,
|
Aliases: flagInteractiveAliases,
|
||||||
},
|
},
|
||||||
|
&cli.BoolFlag{
|
||||||
|
Name: flagInteractiveFromName,
|
||||||
|
Usage: flagInteractiveFromUsage,
|
||||||
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: flagAutoGitCommitName,
|
Name: flagAutoGitCommitName,
|
||||||
Usage: flagAutoGitCommitUsage,
|
Usage: flagAutoGitCommitUsage,
|
||||||
|
|
Loading…
Reference in New Issue