diff options
| author | Jeff Carr <[email protected]> | 2025-01-08 03:13:09 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-08 03:13:09 -0600 |
| commit | b0fca659c57dd2cb6a88a74d1a349117a3908124 (patch) | |
| tree | d1e43473858cead9872a4652aaaeed85dd2afd38 /currentVersions.go | |
| parent | ebda2ea222ed9f1d348d5d3e0cffb9c9f9c0acec (diff) | |
fix the dumb names
Diffstat (limited to 'currentVersions.go')
| -rw-r--r-- | currentVersions.go | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/currentVersions.go b/currentVersions.go index 65e40ed..6eeee18 100644 --- a/currentVersions.go +++ b/currentVersions.go @@ -37,7 +37,7 @@ func (repo *Repo) setMasterVersion() { if err == nil { repo.MasterVersion = v } else { - log.Log(GITPBWARN, "gitpb.GitMasterVersion() error:", err) + log.Log(WARN, "gitpb.GitMasterVersion() error:", err) repo.MasterVersion = "giterr" } } @@ -48,7 +48,7 @@ func (repo *Repo) setDevelVersion() { if err == nil { repo.DevelVersion = v } else { - log.Log(GITPBWARN, "gitpb.GitDevelVersion() error:", err) + log.Log(WARN, "gitpb.GitDevelVersion() error:", err) repo.DevelVersion = "deverr" } } @@ -59,7 +59,7 @@ func (repo *Repo) setUserVersion() { if err == nil { repo.UserVersion = v } else { - log.Log(GITPBWARN, "gitpb.GitUserVersion() error:", err) + log.Log(WARN, "gitpb.GitUserVersion() error:", err) repo.UserVersion = "uerr" } } @@ -70,8 +70,8 @@ func (repo *Repo) GetCurrentBranchName() string { r := repo.RunQuiet([]string{"git", "branch", "--show-current"}) output := strings.Join(r.Stdout, "\n") if r.Error != nil { - log.Log(GITPBWARN, "GetCurrentBranchName() not in a git repo?", r.Error, repo.GetGoPath()) - log.Log(GITPBWARN, "GetCurrentBranchName() output might have worked anyway:", output) + log.Log(WARN, "GetCurrentBranchName() not in a git repo?", r.Error, repo.GetGoPath()) + log.Log(WARN, "GetCurrentBranchName() output might have worked anyway:", output) } return strings.TrimSpace(output) } @@ -145,25 +145,25 @@ func (repo *Repo) gitVersionByName(name string) (string, error) { r := repo.RunQuiet([]string{"git", "describe", "--tags", "--always"}) output := strings.Join(r.Stdout, "\n") if r.Error != nil { - log.Log(GITPBWARN, "gitDescribeByName() output might have worked anyway:", output) - log.Log(GITPBWARN, "gitDescribeByName() not in a git repo?", r.Error, repo.GetGoPath()) + log.Log(WARN, "gitDescribeByName() output might have worked anyway:", output) + log.Log(WARN, "gitDescribeByName() not in a git repo?", r.Error, repo.GetGoPath()) return "", r.Error } return strings.TrimSpace(output), nil } if !repo.IsBranch(name) { // tag does not exist - log.Log(GITPBWARN, "LocalTagExists()", name, "did not exist") + 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} result := repo.RunQuiet(cmd) output := strings.Join(result.Stdout, "\n") if result.Error != nil { - log.Log(GITPBWARN, "cmd =", cmd) - log.Log(GITPBWARN, "err =", result.Error) - log.Log(GITPBWARN, "output (might have worked with error?) =", output) - log.Log(GITPBWARN, "not in a git repo or bad tag?", repo.GetGoPath()) + log.Log(WARN, "cmd =", cmd) + log.Log(WARN, "err =", result.Error) + 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 } @@ -188,13 +188,13 @@ func (repo *Repo) IsBranch(findname string) bool { continue } path, filename := filepath.Split(tagname) - log.Log(GITPB, "gitpb.IsBranch() tag:", path, filename, "from", repo.GetGoPath()) + log.Log(INFO, "gitpb.IsBranch() tag:", path, filename, "from", repo.GetGoPath()) if filename == findname { - log.Log(GITPB, "gitpb.IsBranch() found tag:", path, filename, "from", repo.GetGoPath()) + log.Log(INFO, "gitpb.IsBranch() found tag:", path, filename, "from", repo.GetGoPath()) return true } } - log.Log(GITPB, "did not find tag:", findname, "in", repo.GetGoPath()) + log.Log(INFO, "did not find tag:", findname, "in", repo.GetGoPath()) return false } @@ -210,13 +210,13 @@ func (repo *Repo) IsLocalBranch(findname string) bool { continue } path, filename := filepath.Split(tagname) - log.Log(GITPB, "gitpb.IsBranch() tag:", path, filename, "from", repo.GetGoPath()) + log.Log(INFO, "gitpb.IsBranch() tag:", path, filename, "from", repo.GetGoPath()) if filename == findname { - log.Log(GITPB, "gitpb.IsBranch() found tag:", path, filename, "from", repo.GetGoPath()) + log.Log(INFO, "gitpb.IsBranch() found tag:", path, filename, "from", repo.GetGoPath()) return true } } - log.Log(GITPB, "did not find tag:", findname, "in", repo.GetGoPath()) + log.Log(INFO, "did not find tag:", findname, "in", repo.GetGoPath()) return false } @@ -237,11 +237,11 @@ func normalizeVersion(s string) string { } reg, err := regexp.Compile("[^0-9.]+") if err != nil { - log.Log(GITPBWARN, "normalizeVersion() regexp.Compile() ERROR =", err) + log.Log(WARN, "normalizeVersion() regexp.Compile() ERROR =", err) return parts[0] } clean := reg.ReplaceAllString(parts[0], "") - log.Log(GITPB, "normalizeVersion() s =", clean) + log.Log(INFO, "normalizeVersion() s =", clean) return clean } |
