guireleaser/scanGoSum.go

48 lines
1.2 KiB
Go
Raw Normal View History

2024-02-17 14:21:05 -06:00
// This is a simple example
package main
/*
2024-02-17 14:21:05 -06:00
func scanGoSum() {
2024-02-18 15:09:04 -06:00
for _, repo := range me.repos.View.AllRepos() {
if repo.GoPath() == "go.wit.com/apps/guireleaser" {
if me.release.guireleaser == nil {
me.release.guireleaser = repo
2024-02-17 14:21:05 -06:00
}
}
2024-02-18 15:09:04 -06:00
latestversion := repo.Status.GetLastTagVersion()
if repo.GoState() == "BAD" {
2024-02-17 14:21:05 -06:00
continue
}
2024-02-18 15:09:04 -06:00
if repo.GoState() == "DIRTY" {
2024-02-17 14:21:05 -06:00
continue
}
2024-02-20 06:53:07 -06:00
if repo.Status.IsPrimitive() {
log.Info("PRIMITIVE repo:", latestversion, repo.GoPath())
repo.SetGoState("PRIMITIVE")
2024-02-17 14:21:05 -06:00
continue
}
2024-02-18 15:09:04 -06:00
if repo.CheckDirty() {
log.Info("dirty repo:", latestversion, repo.GoPath())
log.Info("dirty repo.getGoSumStatus =", repo.GoState())
repo.SetGoState("DIRTY")
2024-02-17 14:21:05 -06:00
// me.release.repo.SetValue(repo.status.String())
// me.release.status.SetValue("dirty")
// me.release.notes.SetValue("You must commit your changes\nbefore you can continue")
// me.current = repo
// me.release.openrepo.Enable()
2024-02-17 14:21:05 -06:00
continue
}
2024-02-18 15:09:04 -06:00
status := repo.State()
2024-02-17 14:21:05 -06:00
if status == "PERFECT" {
continue
} else {
2024-02-18 15:09:04 -06:00
repo.NewScan()
2024-02-17 14:21:05 -06:00
}
2024-02-18 15:09:04 -06:00
log.Info("repo:", latestversion, status, repo.GoPath())
2024-02-17 14:21:05 -06:00
}
log.Info("scanGoSum() did everything, not sure what to do next")
}
*/