cmd/releasebot: allow final releases without an RC

Remove the requirement for a final release to have an RC, since
point releases may not have one.

Additionally adds some error logs when running ./make.bash

Change-Id: If52d19d01e9e2a49c16d9b55c782bd922637292b
Reviewed-on: https://go-review.googlesource.com/89037
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Andrew Bonventre 2018-01-22 17:27:01 -05:00
Родитель d2c37311ae
Коммит 06ed7b8c14
2 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -302,15 +302,16 @@ func (w *Work) cherryPickCLs() {
if change != nil && labelValue(change, "TryBot-Result") >= +1 {
w.log.Printf("found trybot OK on Gerrit; skipping make.bash")
} else {
_, err = w.runErr("./make.bash")
b, err := w.runErr("./make.bash")
if err != nil {
w.logError(cl, fmt.Sprintf("make.bash after git cherry-pick failed:\n\n"+
" git fetch origin %s\n"+
" git checkout %s\n"+
" git fetch origin %s\n"+
" git cherry-pick %s\n"+
" ./make.bash\n",
lastRef, lastCommit, cl.Ref, cl.Commit))
" ./make.bash: %v\n",
lastRef, lastCommit, cl.Ref, cl.Commit, err))
w.log.Printf("./make.bash: %v: %s", err, b)
w.run("git", "reset", "--hard", "HEAD^")
continue
}

Просмотреть файл

@ -515,7 +515,7 @@ func (w *Work) writeVersion() {
rc = fmt.Sprintf("rc%d", n)
if w.FinalRelease {
if !haveExisting {
if n-1 > 0 && !haveExisting {
w.logError(nil, fmt.Sprintf("cannot issue final release - code has changed since %src%d", version, n-1))
return
}