blob: 44d8ec747714722c7bafb540aafffcfcf86ffe63 [file] [log] [blame]
#!/bin/bash
# Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
# Usage: call directly in the commandline as test/run.sh ensuring that you have
# both 'dart' and 'content_shell' in your path. Filter tests by passing a
# pattern as an argument to this script.
# bail on error
set -e
DIR=$( cd $( dirname "${BASH_SOURCE[0]}" ) && pwd )
pushd $DIR > /dev/null
POLYMER_REMOTE=https://github.com/Polymer
POLYMER_DIR=../../../third_party/polymer
NEWLINE=$'\n'
REVISIONS=""
for NAME in ShadowDOM observe-js WeakMap platform-dev; do
GIT_REMOTE="$POLYMER_REMOTE/$NAME.git"
GIT_DIR="$POLYMER_DIR/$NAME"
echo "*** Syncing $GIT_DIR from $GIT_REMOTE"
if [ -d "$GIT_DIR" ]; then
pushd $GIT_DIR > /dev/null
git remote set-url origin $GIT_REMOTE
git pull
popd
else
git clone $GIT_REMOTE $GIT_DIR
fi
pushd $GIT_DIR > /dev/null
REVISIONS="$REVISIONS $NEWLINE $NAME is at revision `git rev-parse HEAD`"
popd
done
echo '*** Installing NPM prerequisites'
npm install
echo '*** Running grunt'
grunt
echo "*** Saving REVISIONS file"
echo "$REVISIONS" > ../REVISIONS