Skip to content

Commit

Permalink
fix: build flags
Browse files Browse the repository at this point in the history
  • Loading branch information
natesales committed Jul 24, 2021
1 parent f5f5059 commit 567f031
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ func init() {
rootCmd.PersistentFlags().BoolVarP(&noConfigure, "no-configure", "n", false, "Don't configure BIRD")
}

func Execute() error {
func Execute(v string, c string, d string) error {
version = v
commit = c
date = d
return rootCmd.Execute()
}
9 changes: 8 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@ import (
"github.com/natesales/pathvector/cmd"
)

// Build process flags
var (
version = "devel"
commit = "unknown"
date = "unknown"
)

//go:generate ./generate.sh

func main() {
if err := cmd.Execute(); err != nil {
if err := cmd.Execute(version, commit, date); err != nil {
log.Fatal(err)
}
}

0 comments on commit 567f031

Please sign in to comment.