Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix version preview #84

Merged
merged 2 commits into from
Jul 8, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func Execute() {
// init cobra global commands
func init() {
cobra.OnInitialize(initCmd)
rootCmd.SetVersionTemplate(`{{printf "Finala %s" .Version}}`)
rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "/etc/finala/config.yaml", "path to the config file")
}

Expand All @@ -83,5 +84,5 @@ func initCmd() {

// getVersion returns the current build version
func getVersion() string {
return fmt.Sprintf("Finala %s (%s)", version, commit)
return fmt.Sprintf("%s (%s)", version, commit)
}