]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add CI step to verify merged vendor js
authorRoeland Jago Douma <roeland@famdouma.nl>
Fri, 10 Mar 2017 09:45:27 +0000 (10:45 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Wed, 22 Mar 2017 07:49:03 +0000 (08:49 +0100)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
.drone.yml
build/mergejschecker.sh [new file with mode: 0755]

index 5d4ab2ca963076857872d8247ea585fc3368473e..5cfba60cd459983cf6e361939fdc2a595465f3ed 100644 (file)
@@ -19,6 +19,13 @@ pipeline:
     when:
       matrix:
         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:
     image: nextcloudci/php7.0:php7.0-7
     commands:
@@ -493,6 +500,7 @@ matrix:
     - TESTS: integration-ldap-features
     - TESTS: jsunit
     - TESTS: check-autoloader
+    - TESTS: check-mergejs
     - TESTS: app-check-code
     - TESTS: syntax-php5.6
     - TESTS: syntax-php7.0
diff --git a/build/mergejschecker.sh b/build/mergejschecker.sh
new file mode 100755 (executable)
index 0000000..a8c5c37
--- /dev/null
@@ -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