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()
|
check.Reload()
|
||||||
return fmt.Errorf("already released %s", check.GetGoPath())
|
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()) {
|
if me.forge.Config.IsPrivate(me.current.GetGoPath()) {
|
||||||
// do not self update private repos
|
// do not self update private repos
|
||||||
log.Info("This is a private repo.")
|
log.Info("This is a private repo.")
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
// This is a simple example
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -116,6 +115,7 @@ func findNext() bool {
|
||||||
setCurrentRepo(check, "should be good to release", "pretty sure")
|
setCurrentRepo(check, "should be good to release", "pretty sure")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
if findCounter == 0 {
|
if findCounter == 0 {
|
||||||
log.Info("NOTHING TO UPDATE. findCounter =", findCounter, "found len =", me.found.Len())
|
log.Info("NOTHING TO UPDATE. findCounter =", findCounter, "found len =", me.found.Len())
|
||||||
if me.found.Len() == 0 {
|
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.status.SetText(s)
|
||||||
me.release.notes.SetText(note)
|
me.release.notes.SetText(note)
|
||||||
// me.release.openrepo.Enable()
|
// me.release.openrepo.Enable()
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -227,9 +227,11 @@ func rePrepareRelease() {
|
||||||
for repo := range me.found.IterAll() {
|
for repo := range me.found.IterAll() {
|
||||||
if repo.CurrentBranchName != repo.MasterBranchName {
|
if repo.CurrentBranchName != repo.MasterBranchName {
|
||||||
log.Info("repo not on master branch", repo.FullPath)
|
log.Info("repo not on master branch", repo.FullPath)
|
||||||
|
if !argv.Force {
|
||||||
os.Exit(-1)
|
os.Exit(-1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func printDone() {
|
func printDone() {
|
||||||
|
|
Loading…
Reference in New Issue