Skip to content

Commit

Permalink
bug: get rid of incorrect dynamic versioning implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
theredditbandit committed May 22, 2024
1 parent 89218ab commit 02a2210
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
6 changes: 2 additions & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ import (
"errors"

"github.com/spf13/cobra"

"github.com/theredditbandit/pman/pkg/utils"
)

const (
StatusBucket = "projects"
ProjectPathBucket = "projectPaths"
ProjectAliasBucket = "projectAliases"
ConfigBucket = "config"
version = "1.0"
version = "1.0.1"
)

var (
Expand All @@ -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 {
Expand Down
9 changes: 0 additions & 9 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

0 comments on commit 02a2210

Please sign in to comment.