Skip to content

Commit

Permalink
Merge branch 'travis'
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Jun 8, 2017
2 parents 9de63f3 + 93a1edd commit 6a5b09a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ php:
- 5.4
- hhvm

env:
- CLOSURE_VERSION: 20161024

matrix:
allow_failures:
- php: hhvm
Expand All @@ -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
Expand Down
16 changes: 16 additions & 0 deletions tests/dl-closure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
set -xe

: ${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
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"

0 comments on commit 6a5b09a

Please sign in to comment.