diff --git a/cmd/root.go b/cmd/root.go index b29c4f1..0ad7888 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -4,8 +4,6 @@ import ( "errors" "github.com/spf13/cobra" - - "github.com/theredditbandit/pman/pkg/utils" ) const ( @@ -13,7 +11,7 @@ const ( ProjectPathBucket = "projectPaths" ProjectAliasBucket = "projectAliases" ConfigBucket = "config" - version = "1.0" + version = "1.0.1" ) var ( @@ -23,7 +21,7 @@ var ( var rootCmd = &cobra.Command{ Use: "pman", Short: "A cli project manager", - Version: utils.GetVersion(), + Version: version, SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 8a13913..deddc20 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -129,12 +129,3 @@ func DayPassed(t string) bool { recTime, _ := strconv.ParseInt(t, 10, 64) return now-recTime > int64(oneDay) } - -func GetVersion() string { - cmd := exec.Command("git", "describe", "--tags", "--always") - out, err := cmd.Output() - if err != nil { - return "unknown" - } - return strings.TrimSpace(string(out)) -}