diff options
| author | Jeff Carr <[email protected]> | 2025-02-15 18:51:56 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-15 18:51:56 -0600 |
| commit | 5d0f74360f7be1c5f7adced242e0a8e613fdcfd1 (patch) | |
| tree | 5e0b00692d7d86e89f7f84378b25b767298a1883 /reload.go | |
| parent | c9149bbb13654d76518365d199dc0d51d6f5cfaf (diff) | |
finally use protobuf for thisv0.0.80
Diffstat (limited to 'reload.go')
| -rw-r--r-- | reload.go | 25 |
1 files changed, 2 insertions, 23 deletions
@@ -58,30 +58,9 @@ func (repo *Repo) SetUserBranchName(bname string) { repo.UserBranchName = bname } -// updates LastTag // todo, get this from the protobuf +// updates LastTag by age func (repo *Repo) setLastTag() { - cmd := []string{"git", "rev-list", "--tags", "--max-count=1"} - result, _ := repo.RunQuiet(cmd) - // log.Info("getLastTagVersion()", result.Stdout) - - if len(result.Stdout) != 1 { - // log.Log(WARN, "no gitpb.LastTag() repo is broken. ignore this.", repo.GetGoPath()) - repo.LastTag = "" - return - } - - hash := result.Stdout[0] - - cmd = []string{"git", "describe", "--tags", "--always", hash} - result, _ = repo.RunQuiet(cmd) - - if len(result.Stdout) != 1 { - log.Log(WARN, "git LastTag() error:", result.Stdout, "hash =", hash) - repo.LastTag = "" - return - } - - repo.LastTag = result.Stdout[0] + repo.LastTag = repo.FindLastTag() } func (repo *Repo) setCurrentBranchName() { |
