diff options
Diffstat (limited to 'reload.go')
| -rw-r--r-- | reload.go | 27 |
1 files changed, 3 insertions, 24 deletions
@@ -13,36 +13,15 @@ func (repo *Repo) Reload() error { repo.GoDeps = new(GoDeps) repo.ParseGoSum() - if repo.GoInfo != nil { - repo.ReloadGo() - } - repo.setLastTag() repo.setCurrentBranchName() + repo.setRepoType() // everything has been checked, now save the mtime's repo.RepoChanged() return nil } -func (repo *Repo) ReloadGo() error { - repo.GoPlugin = false - repo.GoProtobuf = false - repo.GoLibrary = false - repo.GoBinary = false - switch repo.goListRepoType() { - case "plugin": - repo.GoPlugin = true - case "protobuf": - repo.GoProtobuf = true - case "library": - repo.GoLibrary = true - case "binary": - repo.GoBinary = true - } - return nil -} - func (repo *Repo) SetDevelBranchName(bname string) { repo.DevelBranchName = bname } @@ -82,7 +61,7 @@ func (repo *Repo) setCurrentBranchName() { 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.GoPath) + log.Log(GITPBWARN, "GetCurrentBranchName() not in a git repo?", r.Error, repo.GetGoPath()) log.Log(GITPBWARN, "GetCurrentBranchName() output might have worked anyway:", output) } repo.CurrentBranchName = strings.TrimSpace(output) @@ -98,7 +77,7 @@ func (repo *Repo) setCurrentBranchVersion() { r := repo.RunQuiet([]string{"git", "describe", "--tags", "--always"}) output := strings.Join(r.Stdout, "\n") if r.Error != nil { - log.Log(GITPBWARN, "GetCurrentBranchVersion() not in a git repo?", r.Error, repo.GoPath) + log.Log(GITPBWARN, "GetCurrentBranchVersion() not in a git repo?", r.Error, repo.GetGoPath()) log.Log(GITPBWARN, "GetCurrentBranchVersion() output might have worked anyway:", output) } repo.CurrentBranchVersion = strings.TrimSpace(output) |
