1
0

compile-handlebars-templates.sh 1.1 KB

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