Skip to content

Commit

Permalink
only include version if populated
Browse files Browse the repository at this point in the history
  • Loading branch information
gavincabbage committed Oct 7, 2019
1 parent 9f9e43c commit e711ea1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/chiv/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ import (
_ "github.com/lib/pq"
)

var version = "dev"
var version string

func main() {
app := cli.App{
Name: "chiv",
HelpName: "chiv",
Usage: "Archive relational data to Amazon S3",
Version: version,
UsageText: "chiv [flags...]",
HideHelp: true,
Action: run,
Expand Down Expand Up @@ -80,6 +79,10 @@ func main() {
},
}

if version != "" {
app.Version = version
}

cli.HandleExitCoder(app.Run(os.Args))
}

Expand Down

0 comments on commit e711ea1

Please sign in to comment.