server/build/compile-handlebars-templates.sh
Roeland Jago Douma 9a5edbb923
Do not try to compile templates that are not there
Makes for a bit cleaner drone output.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-04-08 09:12:59 +02:00

37 lines
1 KiB
Bash
Executable file

#!/usr/bin/env bash
REPODIR=`git rev-parse --show-toplevel`
cd $REPODIR
# Settings
handlebars -n OC.Settings.Templates settings/js/templates -f settings/js/templates.js
# Systemtags
handlebars -n OC.SystemTags.Templates core/js/systemtags/templates -f core/js/systemtags/templates.js
# Share
handlebars -n OC.Share.Templates core/js/share -f core/js/sharetemplates.js
# Files app
handlebars -n OCA.Files.Templates apps/files/js/templates -f apps/files/js/templates.js
# Workflowengine
handlebars -n OCA.WorkflowEngine.Templates apps/workflowengine/js/templates -f apps/workflowengine/js/templates.js
# Sharing
handlebars -n OCA.Sharing.Templates apps/files_sharing/js/templates -f apps/files_sharing/js/templates.js
# Files external
handlebars -n OCA.Files_External.Templates apps/files_external/js/templates -f apps/files_external/js/templates.js
if [[ $(git diff --name-only) ]]; then
echo "Please submit your compiled handlebars templates"
echo
git diff
exit 1
fi
echo "All up to date! Carry on :D"
exit 0