mirror of
https://github.com/grdl/git-get.git
synced 2026-03-22 18:40:07 +00:00
Add build version metadata to be overridden by ldflags
This commit is contained in:
@@ -8,12 +8,18 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var (
|
||||
version = "dev"
|
||||
commit = "unknown"
|
||||
date = "unknown"
|
||||
)
|
||||
|
||||
var cmd = &cobra.Command{
|
||||
Use: "git-get <repo>",
|
||||
Short: "git get",
|
||||
Run: Run,
|
||||
Args: cobra.ExactArgs(1),
|
||||
Version: "0.0.0",
|
||||
Version: fmt.Sprintf("%s - %s, build at %s", version, commit, date),
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
Reference in New Issue
Block a user