Fix exit status of main script
All checks were successful
the build was successful

It should only be 0 if there was a successful build, otherwise the cron
job will deploy a potentially broken previous build when no git change
is detected.
This commit is contained in:
2019-02-16 15:25:05 +01:00
parent d54a9bd983
commit 8a6b9bc70e
2 changed files with 7 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ buildpids=$(
)
if [ $command = "build_into" -o $command = "git_build_into" -o $command = "svn_build_into" ] && [ "$buildpids" -gt 2 ]; then
debug "build script is already running"
exit 0
exit 1
fi
[ -z "$inc_filenames" ] && . "$basedir/build/filenames.sh"

View File

@@ -69,7 +69,9 @@ git_build_into(){
elif egrep '^Already up-to-date\.' "$GITchanges"; then
debug "No changes to GIT:\n" \
"$(cat "$GITchanges")"
exit 0
# Exit status should only be 0 if there was a successful build.
# So set it to 1 here.
exit 1
else
logstatus GITlatest <"$GITchanges"
regen_xhtml=false
@@ -114,7 +116,9 @@ svn_build_into(){
elif egrep '^At revision [0-9]+\.' "$SVNchanges"; then
debug "No changes to SVN:\n" \
"$(cat "$SVNchanges")"
exit 0
# Exit status should only be 0 if there was a successful build.
# So set it to 1 here.
exit 1
else
logstatus SVNlatest <"$SVNchanges"
regen_xhtml=false