wow, even a name change is a BAD IDEA. NEVER DO IT
This commit is contained in:
parent
f21c471032
commit
3298e02c2a
|
@ -19,6 +19,8 @@ func (repo *Repo) Reload() error {
|
|||
repo.ParseGoSum() // also sets GoPrimitive
|
||||
repo.reloadVersions()
|
||||
repo.setRepoType()
|
||||
repo.CheckDirty()
|
||||
repo.setRepoState()
|
||||
|
||||
// everything has been checked, now save the mtime's
|
||||
repo.updateMtimes()
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
package gitpb
|
||||
|
||||
// does processing on the go.mod and go.sum files
|
||||
|
||||
import (
|
||||
"go.wit.com/log"
|
||||
)
|
||||
|
||||
func (repo *Repo) setRepoState() {
|
||||
if repo == nil {
|
||||
return
|
||||
}
|
||||
if repo.IsDirty() {
|
||||
repo.State = "dirty"
|
||||
return
|
||||
}
|
||||
if repo.GetUserVersion() != repo.GetDevelVersion() {
|
||||
repo.State = "merge to devel"
|
||||
return
|
||||
}
|
||||
if repo.GetDevelVersion() != repo.GetMasterVersion() {
|
||||
repo.State = "merge to main"
|
||||
return
|
||||
}
|
||||
if repo.GetLastTag() != repo.GetMasterVersion() {
|
||||
repo.State = "unchanged"
|
||||
return
|
||||
}
|
||||
|
||||
if repo.CheckBranches() {
|
||||
repo.State = "PERFECT"
|
||||
return
|
||||
}
|
||||
log.Info("Branches are not Perfect", repo.GetFullPath())
|
||||
log.Info("Branches are not Perfect", repo.GetFullPath())
|
||||
log.Info("Branches are not Perfect", repo.GetFullPath())
|
||||
repo.State = "unknown branches"
|
||||
}
|
|
@ -28,12 +28,12 @@ message Repo { // `autogenpb:marshal`
|
|||
string targetVersion = 15; // useful during the package release process
|
||||
bool readOnly = 16; // tracks access to 'git push'
|
||||
string desc = 17; // what is this repo?
|
||||
string state = 18; // status or state. useful for building tooling
|
||||
string stateChange = 18; // used for debugging tool logic
|
||||
string masterVersion = 19; // just store this for now
|
||||
string develVersion = 20; //
|
||||
string userVersion = 21; //
|
||||
repeated string dirtyList = 22; // store the list from git status --porcelain
|
||||
string stateChange = 23; // used for debugging tool logic
|
||||
string state = 23; // status or state. useful for building tooling
|
||||
}
|
||||
|
||||
message Repos { // `autogenpb:marshal`
|
||||
|
|
Loading…
Reference in New Issue