double check finished repos
This commit is contained in:
parent
68ee252acd
commit
ab73c05b9d
|
@ -23,6 +23,8 @@ func doRelease() bool {
|
||||||
log.Warn("something went wrong with the release.version:", me.release.version.String())
|
log.Warn("something went wrong with the release.version:", me.release.version.String())
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
me.done = append(me.done, me.current.GetGoPath())
|
||||||
|
|
||||||
if strings.HasPrefix(me.release.version.String(), "v") {
|
if strings.HasPrefix(me.release.version.String(), "v") {
|
||||||
log.Warn("everything is ok. version starts with v.", me.release.version.String())
|
log.Warn("everything is ok. version starts with v.", me.release.version.String())
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -108,6 +108,16 @@ func rePrepareRelease() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if alreadyDone(check) {
|
||||||
|
// means it was already published
|
||||||
|
// protects against logic errors that might result
|
||||||
|
// in an infinite loop
|
||||||
|
log.Info("WARNING already done", check.GetGoPath())
|
||||||
|
log.Info("WARNING already done", check.GetGoPath())
|
||||||
|
log.Info("WARNING already done", check.GetGoPath())
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if argv.Quick != nil {
|
if argv.Quick != nil {
|
||||||
// if argv has 'quick' don't do anything
|
// if argv has 'quick' don't do anything
|
||||||
// that doesn't actually have a patch
|
// that doesn't actually have a patch
|
||||||
|
@ -139,3 +149,12 @@ func rePrepareRelease() {
|
||||||
}
|
}
|
||||||
me.forge.PrintHumanTable(me.found)
|
me.forge.PrintHumanTable(me.found)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func alreadyDone(repo *gitpb.Repo) bool {
|
||||||
|
for _, gopath := range me.done {
|
||||||
|
if repo.GetGoPath() == gopath {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
14
structs.go
14
structs.go
|
@ -13,15 +13,15 @@ var me *autoType
|
||||||
|
|
||||||
type autoType struct {
|
type autoType struct {
|
||||||
pp *arg.Parser // for parsing the command line args. Yay to alexf lint!
|
pp *arg.Parser // for parsing the command line args. Yay to alexf lint!
|
||||||
myGui *gui.Node
|
myGui *gui.Node // the gui handle itself
|
||||||
|
|
||||||
releaseReasonS string // = "gocui dropdown select"
|
releaseReasonS string // = "gocui dropdown select"
|
||||||
release releaseStruct
|
release releaseStruct // notsure
|
||||||
reposbox *gui.Node
|
reposbox *gui.Node // notsure
|
||||||
reposgrid *gui.Node
|
reposgrid *gui.Node // notsure
|
||||||
reposgroup *gui.Node
|
reposgroup *gui.Node // notsure
|
||||||
current *gitpb.Repo
|
current *gitpb.Repo // tracks the next repo to publish
|
||||||
found *gitpb.Repos // stores the list of repos to process things on
|
found *gitpb.Repos // stores the list of repos to process things on
|
||||||
|
done []string // gopaths for repos already published
|
||||||
|
|
||||||
// this is the repo we are starting in
|
// this is the repo we are starting in
|
||||||
// make sure it never changes so go.mod and go.sum are always there
|
// make sure it never changes so go.mod and go.sum are always there
|
||||||
|
|
Loading…
Reference in New Issue