Commit 00b75a23 authored by Andrew Gerrand's avatar Andrew Gerrand

misc/makerelease: exit with nonzero status code on error

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/129040043
parent 8bca148a
...@@ -154,6 +154,7 @@ func main() { ...@@ -154,6 +154,7 @@ func main() {
log.Fatalln("setupOAuthClient:", err) log.Fatalln("setupOAuthClient:", err)
} }
} }
ok := true
for _, targ := range flag.Args() { for _, targ := range flag.Args() {
var b Build var b Build
if m := fileRe.FindStringSubmatch(targ); m != nil { if m := fileRe.FindStringSubmatch(targ); m != nil {
...@@ -205,8 +206,12 @@ func main() { ...@@ -205,8 +206,12 @@ func main() {
} }
if err := b.Do(); err != nil { if err := b.Do(); err != nil {
log.Printf("%s: %v", targ, err) log.Printf("%s: %v", targ, err)
ok = false
} }
} }
if !ok {
os.Exit(1)
}
} }
type Build struct { type Build struct {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment