Tweak build/clone logic to always do a checkout, and to bail gracefully when a commit doesn't exist (skipping the relevant repoTag build)
This commit is contained in:
parent
4b6f49153d
commit
845488129d
11
build.sh
11
build.sh
|
|
@ -193,8 +193,12 @@ while [ "$#" -gt 0 ]; do
|
||||||
|
|
||||||
echo "Processing $repoTag ..."
|
echo "Processing $repoTag ..."
|
||||||
|
|
||||||
if [ "$doClone" ]; then
|
if ! ( cd "$gitRepo" && git rev-parse --verify "${gitRef}^{commit}" &> /dev/null ); then
|
||||||
( cd "$gitRepo" && git clean -dfxq && git checkout -q "$gitRef" && "$dir/git-set-dir-times" )
|
echo "- skip; invalid ref: $gitRef"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
( cd "$gitRepo" && git clean -dfxq && git checkout -q "$gitRef" )
|
||||||
# TODO git tag
|
# TODO git tag
|
||||||
|
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
|
|
@ -211,9 +215,10 @@ while [ "$#" -gt 0 ]; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$doBuild" ]; then
|
if [ "$doBuild" ]; then
|
||||||
|
( cd "$gitRepo/$gitDir" && "$dir/git-set-dir-times" )
|
||||||
|
|
||||||
thisLog="$logDir/build-$repoTag.log"
|
thisLog="$logDir/build-$repoTag.log"
|
||||||
touch "$thisLog"
|
touch "$thisLog"
|
||||||
ln -sf "$thisLog" "$latestLogDir/$(basename "$thisLog")"
|
ln -sf "$thisLog" "$latestLogDir/$(basename "$thisLog")"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue