Skip to content

Commit

Permalink
feat: add simpleouput flag
Browse files Browse the repository at this point in the history
- adds cobra flag which toggles simple mode
  • Loading branch information
fallion committed Oct 22, 2019
1 parent b5dda82 commit 410021a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import (
"github.com/spf13/viper"
)

var simpleOutput bool

func init() {
publishCmd.PersistentFlags().BoolVar(&simpleOutput, "simple", false, "use simplified output")
rootCmd.AddCommand(publishCmd)
}

Expand Down Expand Up @@ -105,7 +108,9 @@ var publishCmd = &cobra.Command{

sections := text.SplitSections(parsedCommits)

releaseNotes := text.ReleaseNotes{}
releaseNotes := text.ReleaseNotes{
Simple: simpleOutput,
}

err = releaseService.Release(releaseNotes.Generate(sections))

Expand Down

0 comments on commit 410021a

Please sign in to comment.