зеркало из https://github.com/nextcloud/spreed.git
Merge pull request #1306 from nextcloud/add-drone-step-to-check-handlebars-templates
Add Drone step to check Handlebars templates
This commit is contained in:
Коммит
1d7639bae1
|
@ -31,6 +31,14 @@ pipeline:
|
|||
when:
|
||||
matrix:
|
||||
TESTS: check-app-compatbility
|
||||
handlebars:
|
||||
image: node
|
||||
commands:
|
||||
- npm install -g handlebars
|
||||
- ./check-handlebars-templates.sh
|
||||
when:
|
||||
matrix:
|
||||
TESTS: handlebars
|
||||
syntax-php7.0:
|
||||
image: nextcloudci/php7.0:php7.0-19
|
||||
environment:
|
||||
|
@ -193,6 +201,7 @@ matrix:
|
|||
- TESTS: eslint
|
||||
- TESTS: stylelint
|
||||
- TESTS: check-app-compatbility
|
||||
- TESTS: handlebars
|
||||
- TESTS: syntax-php7.0
|
||||
- TESTS: signed-off-check
|
||||
- TESTS: php7.0
|
||||
|
|
4
Makefile
4
Makefile
|
@ -31,8 +31,8 @@ install-npm-deps:
|
|||
install-npm-deps-dev:
|
||||
npm install --deps
|
||||
|
||||
build-js-templates:
|
||||
handlebars -n OCA.VideoCalls.Admin.Templates js/admin/templates/ -f js/admin/templates.js
|
||||
compile-handlebars-templates: dev-setup
|
||||
bash compile-handlebars-templates.sh
|
||||
|
||||
dev-setup: install-npm-deps-dev
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
REPODIR=`git rev-parse --show-toplevel`
|
||||
|
||||
cd $REPODIR
|
||||
|
||||
bash compile-handlebars-templates.sh || exit 1
|
||||
|
||||
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
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Prefer the local handlebars script, and fall back to the global one.
|
||||
export PATH=./node_modules/.bin/:$PATH
|
||||
|
||||
handlebars -n OCA.VideoCalls.Admin.Templates js/admin/templates/ -f js/admin/templates.js
|
|
@ -13,6 +13,7 @@
|
|||
"author": "",
|
||||
"license": "AGPL-3.0",
|
||||
"devDependencies": {
|
||||
"handlebars": "^4.0.12",
|
||||
"jasmine": "^2.5.2",
|
||||
"jasmine-ajax": "^3.2.0",
|
||||
"jasmine-core": "^2.5.2",
|
||||
|
|
Загрузка…
Ссылка в новой задаче