2016-10-30 20:54:24 +01:00
|
|
|
#!/bin/bash -e
|
|
|
|
# Copyright 2016 Google Inc. Use of this source code is governed by an MIT-style
|
|
|
|
# license that can be found in the LICENSE file or at
|
|
|
|
# https://opensource.org/licenses/MIT.
|
|
|
|
|
|
|
|
# Echoes a command, then runs it.
|
|
|
|
echo-and-run ()
|
|
|
|
{
|
|
|
|
echo "\$ $@"
|
|
|
|
"$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Emit folding annotations on Travis, or just newlines elsewhere.
|
|
|
|
fold ()
|
|
|
|
{
|
|
|
|
if [ "$TRAVIS" = true ]; then
|
|
|
|
echo "travis_fold:start:$1"
|
|
|
|
fi
|
|
|
|
echo-and-run "${@:2}"
|
|
|
|
if [ "$TRAVIS" = true ]; then
|
|
|
|
echo "travis_fold:end:$1"
|
|
|
|
else
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2016-10-31 23:14:25 +01:00
|
|
|
if [ "$ANALYZE" != false ]; then
|
|
|
|
echo-and-run dartanalyzer --fatal-warnings lib/
|
|
|
|
fi
|
2016-10-30 20:54:24 +01:00
|
|
|
echo-and-run ./tool/assert-formatted.sh
|
|
|
|
|
|
|
|
dart_sass=`pwd`
|
|
|
|
dir=`mktemp -d /tmp/sass-spec-XXXXXXXX`
|
|
|
|
cd "$dir"
|
|
|
|
|
|
|
|
fold "git.sass-spec" \
|
2016-11-03 01:01:03 +01:00
|
|
|
git clone git://github.com/sass/sass-spec --branch dart-sass-old --depth 1
|
2016-10-30 20:54:24 +01:00
|
|
|
cd sass-spec
|
|
|
|
|
|
|
|
fold "bundle" bundle install --jobs=3 --retry=3
|
|
|
|
echo-and-run bundle exec sass-spec.rb --output-style expanded --probe-todo --dart "$dart_sass"
|