diff options
Diffstat (limited to 'currentVersions.go')
| -rw-r--r-- | currentVersions.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/currentVersions.go b/currentVersions.go index 20d9aee..682d582 100644 --- a/currentVersions.go +++ b/currentVersions.go @@ -90,11 +90,11 @@ func (repo *Repo) gitDescribeByHash(hash string) (string, error) { if hash == "" { return "", errors.New("hash was blank") } - r, err := repo.RunQuiet([]string{"git", "describe", "--tags", "--always", hash}) + r, err := repo.RunQuiet([]string{"git", "describe", "--tags", hash}) out := strings.Join(r.Stdout, "\n") if err != nil { - log.Warn("not in a git repo or bad hash?", err, repo.GetGoPath()) - return out, err + // log.Warn("not in a git repo or bad hash?", err, repo.GetGoPath()) + return "gitpb err", err } return out, err } @@ -134,7 +134,7 @@ func (repo *Repo) gitVersionByName(name string) (string, error) { if name == "" { // git will return the current tag - r, err := repo.RunQuiet([]string{"git", "describe", "--tags", "--always"}) + r, err := repo.RunQuiet([]string{"git", "describe", "--tags"}) output := strings.Join(r.Stdout, "\n") if err != nil { log.Log(WARN, "gitDescribeByName() output might have worked anyway:", output) @@ -148,14 +148,14 @@ func (repo *Repo) gitVersionByName(name string) (string, error) { // log.Log(WARN, "LocalTagExists()", name, "did not exist") return "", errors.New("gitDescribeByName() git fatal: Not a valid object name: " + name) } - cmd := []string{"git", "describe", "--tags", "--always", name} + cmd := []string{"git", "describe", "--tags", name} result, err := repo.RunQuiet(cmd) output := strings.Join(result.Stdout, "\n") if err != nil { - log.Log(WARN, "cmd =", cmd) - log.Log(WARN, "err =", err) - log.Log(WARN, "output (might have worked with error?) =", output) - log.Log(WARN, "not in a git repo or bad tag?", repo.GetGoPath()) + //log.Log(WARN, "cmd =", cmd) + //log.Log(WARN, "err =", err) + //log.Log(WARN, "output (might have worked with error?) =", output) + //log.Log(WARN, "not in a git repo or bad tag?", repo.GetGoPath()) return "", result.Error } |
