Add CI step to verify merged vendor js

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2017-03-10 10:45:27 +01:00
parent 98a14909e1
commit 12de9ad655
No known key found for this signature in database
GPG Key ID: F941078878347C0C
2 changed files with 34 additions and 0 deletions

View File

@ -19,6 +19,13 @@ pipeline:
when: when:
matrix: matrix:
TESTS: check-autoloader TESTS: check-autoloader
check-mergejs:
image: nextcloudci/php7.0:php7.0-7
commands:
- bash ./build/mergejschecker.sh
when:
matrix:
TESTS: check-mergejs
app-check-code: app-check-code:
image: nextcloudci/php7.0:php7.0-7 image: nextcloudci/php7.0:php7.0-7
commands: commands:
@ -493,6 +500,7 @@ matrix:
- TESTS: integration-ldap-features - TESTS: integration-ldap-features
- TESTS: jsunit - TESTS: jsunit
- TESTS: check-autoloader - TESTS: check-autoloader
- TESTS: check-mergejs
- TESTS: app-check-code - TESTS: app-check-code
- TESTS: syntax-php5.6 - TESTS: syntax-php5.6
- TESTS: syntax-php7.0 - TESTS: syntax-php7.0

26
build/mergejschecker.sh Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/env bash
#Regenerate the vendors core.js
echo
echo "Regenerating core/vendor/core.js"
d=`dirname $(readlink -f $0)`
php $d/mergejs.php
files=`git diff --name-only`
for file in $files
do
if [[ $file == core/vendor/core.js ]]
then
echo "The merged vendor file is not up to date"
echo "Please run: php build/mergejs.php"
echo "And commit the result"
exit 1
break
fi
done
echo "Vendor js merged as expected. Carry on"
exit 0