summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-11-21 12:02:39 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-11-21 12:02:39 +0100
commite629363dea265e52aee4011d66dc4c3380c9ab62 (patch)
tree366a6f513a1ef0314b75ef9df916b07fe0879d2e
parent970a22f9ceb8590be661051fce0b371f532291a3 (diff)
Add Drone step to check the Handlebars templates
Now if the source templates were modified but their compiled versions were not updated the Drone job will fail. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--.drone.yml9
-rwxr-xr-xcheck-handlebars-templates.sh17
2 files changed, 26 insertions, 0 deletions
diff --git a/.drone.yml b/.drone.yml
index f82de7b6b..296577a6f 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -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
diff --git a/check-handlebars-templates.sh b/check-handlebars-templates.sh
new file mode 100755
index 000000000..ae1e63946
--- /dev/null
+++ b/check-handlebars-templates.sh
@@ -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