fix versioning
This commit is contained in:
parent
92dd54a823
commit
ee0196e378
|
@ -1,6 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
@ -8,14 +9,20 @@ import (
|
|||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// Version of current build
|
||||
var Version = "devel"
|
||||
var (
|
||||
BuildVersion = "devel"
|
||||
BuildDate = "00000000"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cli.VersionPrinter = func(c *cli.Context) {
|
||||
fmt.Printf("%s version=%s date=%s\n", c.App.Name, c.App.Version, BuildDate)
|
||||
}
|
||||
|
||||
app := cli.NewApp()
|
||||
app.Name = "url-parser"
|
||||
app.Usage = "Parse URL and shows the part of it."
|
||||
app.Version = Version
|
||||
app.Version = BuildVersion
|
||||
app.Action = command.Run
|
||||
app.Flags = globalFlags()
|
||||
app.Commands = configCommands()
|
||||
|
|
Loading…
Reference in New Issue