Add explicit error handling in more places
This commit is contained in:
parent
2d4e8fea07
commit
1a0f624c3e
19
bashbrew.sh
19
bashbrew.sh
|
|
@ -292,7 +292,7 @@ while [ "$#" -gt 0 ]; do
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$doBuild" ]; then
|
if [ "$doBuild" ]; then
|
||||||
(
|
if ! (
|
||||||
set -x
|
set -x
|
||||||
cd "$gitRepo"
|
cd "$gitRepo"
|
||||||
git reset -q HEAD
|
git reset -q HEAD
|
||||||
|
|
@ -301,19 +301,30 @@ while [ "$#" -gt 0 ]; do
|
||||||
git checkout -q "$gitRef" --
|
git checkout -q "$gitRef" --
|
||||||
cd "$gitRepo/$gitDir"
|
cd "$gitRepo/$gitDir"
|
||||||
"$dir/git-set-mtimes"
|
"$dir/git-set-mtimes"
|
||||||
) &>> "$thisLog"
|
) &>> "$thisLog"; then
|
||||||
|
echo "- failed 'git checkout'; see $thisLog"
|
||||||
|
didFail=1
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
if ! (
|
if ! (
|
||||||
set -x
|
set -x
|
||||||
"$docker" build -t "$repoTag" "$gitRepo/$gitDir"
|
"$docker" build -t "$repoTag" "$gitRepo/$gitDir"
|
||||||
) &>> "$thisLog"; then
|
) &>> "$thisLog"; then
|
||||||
echo "- failed; see $thisLog"
|
echo "- failed 'docker build'; see $thisLog"
|
||||||
didFail=1
|
didFail=1
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for namespace in $namespaces; do
|
for namespace in $namespaces; do
|
||||||
( set -x; "$docker" tag "$repoTag" "$namespace/$repoTag" ) &>> "$thisLog"
|
if ! (
|
||||||
|
set -x
|
||||||
|
"$docker" tag "$repoTag" "$namespace/$repoTag"
|
||||||
|
) &>> "$thisLog"; then
|
||||||
|
echo "- failed 'docker tag'; see $thisLog"
|
||||||
|
didFail=1
|
||||||
|
continue
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue