wasn't reloading versions

This commit is contained in:
Jeff Carr 2024-12-17 23:01:13 -06:00
parent 339393a88a
commit af50986812
3 changed files with 8 additions and 8 deletions

View File

@ -14,10 +14,13 @@ import (
"go.wit.com/log" "go.wit.com/log"
) )
func (repo *Repo) InitVersions() { func (repo *Repo) reloadVersions() {
repo.setMasterVersion() repo.setMasterVersion()
repo.setDevelVersion() repo.setDevelVersion()
repo.setUserVersion() repo.setUserVersion()
repo.setLastTag()
repo.setCurrentBranchName()
repo.setCurrentBranchVersion()
} }
func (repo *Repo) setMasterVersion() { func (repo *Repo) setMasterVersion() {

View File

@ -16,12 +16,8 @@ func (repo *Repo) Reload() error {
if repo.GoInfo == nil { if repo.GoInfo == nil {
repo.GoInfo = new(GoInfo) repo.GoInfo = new(GoInfo)
} }
repo.ParseGoSum() repo.ParseGoSum() // also sets GoPrimitive
repo.reloadVersions()
repo.setLastTag()
repo.setCurrentBranchName()
repo.setCurrentBranchVersion()
repo.setRepoType() repo.setRepoType()
// everything has been checked, now save the mtime's // everything has been checked, now save the mtime's

View File

@ -38,7 +38,8 @@ func (repo *Repo) GetRepoType() string {
if repo.GoInfo.GoLibrary { if repo.GoInfo.GoLibrary {
return "library" return "library"
} }
return "err" // todo: figure out what to do here. for now, binary is easiest
return "binary"
} }
func (repo *Repo) setRepoType() { func (repo *Repo) setRepoType() {