From a6531d348175835f8d3a46f46421c3065ea45db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 8 Jun 2017 21:45:38 +0300 Subject: [PATCH 1/2] closure: use specific version using latest may break our tests as minified result may differ --- .travis.yml | 8 ++++---- tests/dl-closure.sh | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100755 tests/dl-closure.sh diff --git a/.travis.yml b/.travis.yml index 0ef27a3..10f1bbe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,9 @@ php: - 5.4 - hhvm +env: + - CLOSURE_VERSION: 20160822 + matrix: allow_failures: - php: hhvm @@ -25,10 +28,7 @@ install: - composer update --no-interaction --prefer-source before_script: - - wget -c https://dl.google.com/closure-compiler/compiler-latest.zip -O vendor/compiler-latest.zip - - unzip -od vendor/closure-compiler vendor/compiler-latest.zip - - ln -sfn ../$(echo vendor/closure-compiler/closure-compiler-*.jar) tests/compiler.jar - - java -jar tests/compiler.jar --version + - tests/dl-closure.sh script: - composer validate diff --git a/tests/dl-closure.sh b/tests/dl-closure.sh new file mode 100755 index 0000000..fbb95fe --- /dev/null +++ b/tests/dl-closure.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -xe + +: ${CLOSURE_VERSION:=20160822} + +wget -c https://dl.google.com/closure-compiler/compiler-$CLOSURE_VERSION.zip -O vendor/compiler-$CLOSURE_VERSION.zip +unzip -od vendor/closure-compiler vendor/compiler-$CLOSURE_VERSION.zip +ln -sfn ../vendor/closure-compiler/closure-compiler-v$CLOSURE_VERSION.jar tests/compiler.jar + +# test that version matches +out=$(java -jar tests/compiler.jar --version) + +version=$(echo "$out" | awk '/Version:/{print $NF}') +version=${version#v} + +test "$version" = "$CLOSURE_VERSION" From 93a1edd34bf2dd6f3c8ea9b81fdf8dc1bb815c97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 8 Jun 2017 22:29:33 +0300 Subject: [PATCH 2/2] closure: use 20161024 version this is version the example .min files were created --- .travis.yml | 2 +- tests/dl-closure.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 10f1bbe..7ff3132 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ php: - hhvm env: - - CLOSURE_VERSION: 20160822 + - CLOSURE_VERSION: 20161024 matrix: allow_failures: diff --git a/tests/dl-closure.sh b/tests/dl-closure.sh index fbb95fe..9145b1d 100755 --- a/tests/dl-closure.sh +++ b/tests/dl-closure.sh @@ -1,7 +1,7 @@ #!/bin/sh set -xe -: ${CLOSURE_VERSION:=20160822} +: ${CLOSURE_VERSION:=20161024} wget -c https://dl.google.com/closure-compiler/compiler-$CLOSURE_VERSION.zip -O vendor/compiler-$CLOSURE_VERSION.zip unzip -od vendor/closure-compiler vendor/compiler-$CLOSURE_VERSION.zip