unix: mkall.sh: fail if docker build failed

When docker build fails, docker run (in my case podman) tries to find
the generate:linux image from various mirrors, which is very confusing.
We should error out if docker build fails.

Change-Id: I4fd78e9fa339e03029b1bf003b3239ca23a7ed1b
Reviewed-on: https://go-review.googlesource.com/c/sys/+/706916
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Kirill Kolyshkin <kolyshkin@gmail.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Carlos Amedee <carlos@golang.org>
This commit is contained in:
Kir Kolyshkin
2025-09-25 11:02:34 -07:00
committed by Kirill Kolyshkin
parent ecada54126
commit 1edeebeea0

View File

@@ -49,6 +49,7 @@ esac
if [[ "$GOOS" = "linux" ]]; then
# Use the Docker-based build system
# Files generated through docker (use $cmd so you can Ctl-C the build or run)
set -e
$cmd docker build --tag generate:$GOOS $GOOS
$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && pwd):/build generate:$GOOS
exit