feat: make interactive default true
parent
0e55d7724b
commit
a7b1281b02
|
@ -10,7 +10,7 @@ Tool to generate `CHANGELOG.md`, `CHANGELOG.rst` from [Conventional Commits](htt
|
|||
## Roadmap
|
||||
|
||||
- [ ] Support `CHANGELOG.txt`
|
||||
- [ ] Interactive mode
|
||||
- [x] Interactive mode
|
||||
- [ ] Unit test
|
||||
|
||||
## Install
|
||||
|
|
|
@ -36,8 +36,6 @@ func (a *action) RunGenerate(c *cli.Context) error {
|
|||
|
||||
fmt.Printf("Input to (%s):\n", usageTo)
|
||||
a.flags.to = ioe.ReadInputEmpty()
|
||||
|
||||
// TODO: support more flags
|
||||
}
|
||||
|
||||
commits, err := a.getCommits()
|
||||
|
@ -149,7 +147,7 @@ func (a *action) generateMarkdownChangelog(output, version string, commits []con
|
|||
}
|
||||
|
||||
// Actually writing to changelog file
|
||||
if err := os.WriteFile(output, []byte(changelogText), 0644); err != nil {
|
||||
if err := os.WriteFile(output, []byte(changelogText), 0o644); err != nil {
|
||||
return fmt.Errorf("failed to write file %s: %w", output, err)
|
||||
}
|
||||
|
||||
|
@ -181,7 +179,7 @@ func (a *action) generateRSTChangelog(output, version string, commits []conventi
|
|||
}
|
||||
|
||||
// Actually writing to changelog file
|
||||
if err := os.WriteFile(output, []byte(changelogText), 0644); err != nil {
|
||||
if err := os.WriteFile(output, []byte(changelogText), 0o644); err != nil {
|
||||
return fmt.Errorf("failed to write file %s: %w", output, err)
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ const (
|
|||
usageFilename = "output `FILENAME`"
|
||||
usageFiletype = "output `FILETYPE`"
|
||||
usageDryRun = "demo run without actually changing anything"
|
||||
usageInteractive = "interactive mode"
|
||||
usageInteractive = "interactive mode, default is true"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -110,6 +110,7 @@ func NewApp() *App {
|
|||
Name: flagInteractive,
|
||||
Usage: usageInteractive,
|
||||
Aliases: aliasInteractive,
|
||||
Value: true,
|
||||
},
|
||||
},
|
||||
Action: a.RunGenerate,
|
||||
|
|
Loading…
Reference in New Issue