commit: 875161326086769315e7ff576e62b6768290cfc0
Author: John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 14 21:03:43 2024 +0000
Commit: John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Sat Sep 14 21:07:29 2024 +0000
URL: https://gitweb.gentoo.org/proj/docker-images.git/commit/?id=87516132
set -e in build scripts
We're hitting cases where errors happen and the script proceeds,
making it harder to pinpoint errors.
Signed-off-by: John Helmert III <ajak <AT> gentoo.org>
build-python.sh | 2 ++
build.sh | 4 +++-
deploy-manifests.sh | 2 ++
deploy.sh | 2 ++
4 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/build-python.sh b/build-python.sh
index 6289c05..c1ac346 100755
--- a/build-python.sh
+++ b/build-python.sh
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
+set -e
+
NAME=python
VERSION=${VERSION:-$(date -u +%Y%m%d)}
VERSION_SUFFIX="-${VERSION}"
diff --git a/build.sh b/build.sh
index 0687c46..0fabd00 100755
--- a/build.sh
+++ b/build.sh
@@ -1,9 +1,11 @@
#!/bin/bash
-# Used to create Gentoo stage3 and portage containers simply by specifying a
+# Used to create Gentoo stage3 and portage containers simply by specifying a
# TARGET env variable.
# Example usage: TARGET=stage3-amd64 ./build.sh
+set -e
+
if [[ -z "$TARGET" ]]; then
echo "TARGET environment variable must be set e.g.
TARGET=stage3-amd64-openrc."
exit 1
diff --git a/deploy-manifests.sh b/deploy-manifests.sh
index 5bf0b33..37b735b 100755
--- a/deploy-manifests.sh
+++ b/deploy-manifests.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+set -e
+
if [[ -z "$TARGET" ]]; then
echo "TARGET environment variable must be set e.g.
TARGET=stage3:latest."
exit 1
diff --git a/deploy.sh b/deploy.sh
index 4871735..06f84b1 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+set -e
+
if [[ -z "$TARGET" ]]; then
echo "TARGET environment variable must be set e.g.
TARGET=stage3-amd64-openrc."
exit 1