if no code is updated, do a schema update check and also a cleanup. move to a separate script call to make it easier to add more tasks if required in the future.

This commit is contained in:
Christopher Smith
2016-02-23 13:38:29 +11:00
parent 731c2eb443
commit d9098d3c3c

View File

@@ -34,9 +34,8 @@ status_run() {
if [ -z "$arg" ]; then
up=$(php daily.php -f update >&2; echo $?)
if [ "$up" -eq 0 ]; then
# Updates are disabled.
status_run 'Cleaning up DB' "$0 cleanup"
exit $?
$0 no-code-update
exit
elif [ "$up" -eq 1 ]; then
# Update to Master-Branch
status_run 'Updating to latest codebase' 'git pull --quiet'
@@ -53,6 +52,12 @@ if [ -z "$arg" ]; then
fi
else
case $arg in
no-code-update)
# Updates of the code are disabled, just check for schema updates
# and clean up the db.
status_run 'Updating SQL-Schema' 'php includes/sql-schema/update.php'
status_run 'Cleaning up DB' "$0 cleanup"
;;
post-pull)
# List all tasks to do after pull in the order of execution
status_run 'Updating SQL-Schema' 'php includes/sql-schema/update.php'