compile-handlebars-templates.sh 1004 B

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/env bash
  2. REPODIR=`git rev-parse --show-toplevel`
  3. cd $REPODIR
  4. # Comments files plugin
  5. node node_modules/handlebars/bin/handlebars -n OCA.Comments.Templates apps/comments/src/templates -f apps/comments/src/templates.js
  6. # Settings
  7. node node_modules/handlebars/bin/handlebars -n OC.Settings.Templates apps/settings/js/templates -f apps/settings/js/templates.js
  8. # Files app
  9. node node_modules/handlebars/bin/handlebars -n OCA.Files.Templates apps/files/js/templates -f apps/files/js/templates.js
  10. # Sharing
  11. node node_modules/handlebars/bin/handlebars -n OCA.Sharing.Templates apps/files_sharing/js/templates -f apps/files_sharing/js/templates.js
  12. # Files external
  13. node node_modules/handlebars/bin/handlebars -n OCA.Files_External.Templates apps/files_external/js/templates -f apps/files_external/js/templates.js
  14. if [[ $(git diff --name-only) ]]; then
  15. echo "Please submit your compiled handlebars templates"
  16. echo
  17. git diff
  18. exit 1
  19. fi
  20. echo "All up to date! Carry on :D"
  21. exit 0