add tag check to doRelease()
This commit is contained in:
parent
fd2254cd72
commit
63dc802ded
10
doRelease.go
10
doRelease.go
|
@ -57,6 +57,16 @@ func doRelease() error {
|
|||
check.Reload()
|
||||
return fmt.Errorf("already released %s", check.GetGoPath())
|
||||
}
|
||||
|
||||
// check if the git tag already exists somehow
|
||||
testtag := me.release.version.String()
|
||||
if check.LocalTagExists(testtag) {
|
||||
log.Info("TAG ALREADY EXISTS", testtag)
|
||||
return log.Errorf("%s TAG ALREADY EXISTS %s", check.FullPath, testtag)
|
||||
} else {
|
||||
log.Info("TAG IS NEW", testtag)
|
||||
}
|
||||
|
||||
if me.forge.Config.IsPrivate(me.current.GetGoPath()) {
|
||||
// do not self update private repos
|
||||
log.Info("This is a private repo.")
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
// This is a simple example
|
||||
package main
|
||||
|
||||
import (
|
||||
|
@ -116,6 +115,7 @@ func findNext() bool {
|
|||
setCurrentRepo(check, "should be good to release", "pretty sure")
|
||||
return true
|
||||
}
|
||||
|
||||
if findCounter == 0 {
|
||||
log.Info("NOTHING TO UPDATE. findCounter =", findCounter, "found len =", me.found.Len())
|
||||
if me.found.Len() == 0 {
|
||||
|
@ -159,7 +159,6 @@ func setCurrentRepo(check *gitpb.Repo, s string, note string) bool {
|
|||
me.release.status.SetText(s)
|
||||
me.release.notes.SetText(note)
|
||||
// me.release.openrepo.Enable()
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
@ -227,10 +227,12 @@ func rePrepareRelease() {
|
|||
for repo := range me.found.IterAll() {
|
||||
if repo.CurrentBranchName != repo.MasterBranchName {
|
||||
log.Info("repo not on master branch", repo.FullPath)
|
||||
if !argv.Force {
|
||||
os.Exit(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func printDone() {
|
||||
for _, gopath := range me.done {
|
||||
|
|
Loading…
Reference in New Issue