Simplify logic around triggering full build on webserver
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
delliott 2024-08-23 13:01:45 +02:00
parent e9dde7c0e8
commit 91b49c6323
Signed by: delliott
SSH Key Fingerprint: SHA256:h5IC6Ec/o6ypmpM7ZdRqULGyG8dz4Jr5K192BAWAjoo
2 changed files with 3 additions and 2 deletions

View File

@ -67,8 +67,9 @@ fi
[ -z "$inc_scaffold" ] && . "$basedir/build/scaffold.sh"
case "$command" in
git_build_into) if [ "${statusdir}/full_build" -nt "${statusdir}/../index.cgi" ]; then
git_build_into) if [ -f "${statusdir}/full_build" ]; then
debug "discovered flag file, performing full build"
rm "${statusdir}/full_build"
build_into
else
git_build_into

View File

@ -70,7 +70,7 @@ cat <<-HTML_END
<dt>Duration:</dt><dd>$([ "$duration" -gt 0 ] && duration ${duration})</dd>
<dt>Termination Status:</dt><dd>${term_status:-running...}</dd>
</dl>
$(if [ ./$DATADIR/full_build -nt ./index.cgi ]; then
$(if [ -f ./$DATADIR/full_build ]; then
printf '<span class="fullbuild">Full rebuild will be started within next minute.</span>'
else
printf '<a class="fullbuild" href="./?full_build">Schedule full rebuild</a>'