scripts/update.sh: add verbose error message when commit cannot be found (#1794)

This displays the branch, repo and commitID that was attempted to update to but
failed. Users then can compare this output to the configuration they meant to
activate in modules and hopefully better find their typos.
This commit is contained in:
Christof Schulze 2019-08-21 23:48:06 +02:00 committed by Andreas Ziegler
parent 01e03aa2ea
commit afa3e89890
1 changed files with 4 additions and 1 deletions

View File

@ -20,6 +20,9 @@ for module in $GLUON_MODULES; do
if ! git branch -f base "$commit" 2>/dev/null; then
git fetch "$repo" "$branch"
git branch -f base "$commit"
git branch -f base "$commit" || {
echo "unable to find commit \"$commit\" on branch \"$branch\" in repo \"$repo\"." >&2
exit 1
}
fi
done