Skip to content

Commit

Permalink
fixed+completed: string value of --version-sim will be put into `co…
Browse files Browse the repository at this point in the history
…nf.Version` now.
  • Loading branch information
hedzr committed Aug 8, 2019
1 parent cf91d05 commit a8ced4d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build_xref.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ func attachVersionCommands(root *RootCommand) {
Aliases: []string{"version-simulate"},
Description: "Simulate a faked version number for this app.",
Hidden: true,
Action: func(cmd *Command, args []string) (err error) {
conf.Version = GetStringR("version-sim")
Set("version", conf.Version) // set into option 'app.version' too.
return
},
},
DefaultValue: "",
}
Expand Down

0 comments on commit a8ced4d

Please sign in to comment.