chore: remove dart source and tooling

This commit is contained in:
Jeremy Elbourn
2016-04-05 09:45:27 -07:00
parent c8f87a427a
commit 69512c2f6a
28 changed files with 12 additions and 1688 deletions
-5
View File
@@ -5,8 +5,3 @@ This directory contains scripts that are related to CI only.
### `build-and-test.sh`
The main script. Setup the tests environment, build the files using the `angular-cli` tool and run the tests.
### `install_dart.sh`
Only run in Dart environments. Install Dart locally on the CI.
-10
View File
@@ -10,24 +10,14 @@ cd $(dirname $0)/../..
source scripts/ci/sources/mode.sh
source scripts/ci/sources/tunnel.sh
# Setup environment.
if is_dart; then
./scripts/ci/install_dart.sh
source scripts/ci/sources/env_dart.sh
fi
start_tunnel
npm run build
npm run inline-resources
echo
is_dart && pub install
wait_for_tunnel
if is_lint; then
npm run tslint
npm run ci:forbidden-identifiers
elif is_dart; then
npm run dartanalyzer
elif is_e2e; then
ng serve &
sleep 20
-17
View File
@@ -1,17 +0,0 @@
import {analyze} from '../../tools/build/dart_analyzer';
import {detect} from '../../tools/build/dart';
const command = detect()['ANALYZER'];
analyze('dist/dart', command, true)
.then((err) => {
if (err) {
throw err;
}
console.log('Done.');
})
.catch((err) => {
console.error('Error:', err);
process.exit(1);
});
-33
View File
@@ -1,33 +0,0 @@
#!/bin/bash
set -e -x
if [ -z "${DART_CHANNEL}" -o -z "${DART_VERSION}" -o -z "${ARCH}" ]; then
echo "No Dart necessary. Not installing."
exit 0
fi
AVAILABLE_DART_VERSION=$(curl "https://storage.googleapis.com/dart-archive/channels/${DART_CHANNEL}/release/${DART_VERSION}/VERSION" | python -c \
'import sys, json; print(json.loads(sys.stdin.read())["version"])')
echo Fetch Dart channel: ${DART_CHANNEL}
URL_PREFIX=https://storage.googleapis.com/dart-archive/channels/${DART_CHANNEL}/release/${DART_VERSION}
DART_SDK_URL="$URL_PREFIX/sdk/dartsdk-$ARCH-release.zip"
DARTIUM_URL="$URL_PREFIX/dartium/dartium-$ARCH-release.zip"
download_and_unzip() {
ZIPFILE=${1/*\//}
curl -O -L $1 && unzip -q $ZIPFILE && rm $ZIPFILE
}
# TODO: do these downloads in parallel
download_and_unzip $DART_SDK_URL
download_and_unzip $DARTIUM_URL
echo Fetched new dart version $(<dart-sdk/version)
if [[ -n $DARTIUM_URL ]]; then
mv dartium-* chromium
fi
-95
View File
@@ -1,95 +0,0 @@
#!/bin/bash
set -e -o pipefail
if [[ -z $ENV_SET ]]; then
export ENV_SET=1
unset DART
PLATFORM="$(uname -s)"
case "$PLATFORM" in
(Darwin)
path=$(readlink ${BASH_SOURCE[0]}||echo './scripts/env.sh')
export NGDART_SCRIPT_DIR=$(dirname $path)
;;
(Linux)
export NGDART_SCRIPT_DIR=$(dirname $(readlink -f ${BASH_SOURCE[0]}))
;;
(*)
echo Unsupported platform $PLATFORM. Exiting ... >&2
exit 3
;;
esac
export NGDART_BASE_DIR=$(dirname $NGDART_SCRIPT_DIR)
# Try to find the SDK alongside the dart command first.
if [[ -z "$DART_SDK" ]]; then
DART=$(which dart) || true
if [[ -x "$DART" ]]; then
DART_SDK="${DART/dart-sdk\/*/dart-sdk}"
if [[ ! -e "$DART_SDK" ]]; then
unset DART DART_SDK
fi
fi
fi
# Fallback: Assume it's alongside the current directory (e.g. Travis).
if [[ -z "$DART_SDK" ]]; then
DART_SDK="$(pwd)/dart-sdk"
fi
: "${DART:=$DART_SDK/bin/dart}"
if [[ ! -x "$DART" ]]; then
echo Unable to locate the dart binary / SDK. Exiting >&2
exit 3
fi
if [[ -z "$DARTIUM" ]]; then
dartiumRoot="$DART_SDK/../chromium"
if [[ -e "$dartiumRoot" ]]; then
case "$PLATFORM" in
(Linux) export DARTIUM="$dartiumRoot/chrome" ;;
(Darwin) export DARTIUM="$dartiumRoot/Chromium.app/Contents/MacOS/Chromium" ;;
(*) echo Unsupported platform $PLATFORM. Exiting ... >&2 ; exit 3 ;;
esac
fi
fi
case "$PLATFORM" in
(Linux) export DART_SDK_LIB_SEARCH_PATH="$DART_SDK" ;;
(Darwin) export DART_SDK_LIB_SEARCH_PATH="$DART_SDK/libexec" ;;
(*) echo Unsupported platform $PLATFORM. Exiting ... >&2 ; exit 3 ;;
esac
export DART_SDK
export DARTSDK
export DART
export PUB=${PUB:-"$DART_SDK/bin/pub"}
if [ -z "$PUB_CACHE" ]; then
export PUB_CACHE=$DART_SDK/pub-cache
fi
export DARTANALYZER=${DARTANALYZER:-"$DART_SDK/bin/dartanalyzer"}
export DARTDOC=${DARTDOC:-"$DART_SDK/bin/dartdoc"}
export DART_DOCGEN=${DART_DOCGEN:-"$DART_SDK/bin/docgen"}
export DART_VM_OPTIONS="--old_gen_heap_size=2048"
export DARTIUM_BIN=${DARTIUM_BIN:-"$DARTIUM"}
export CHROME_BIN=${CHROME_BIN:-"google-chrome"}
export PATH=$PATH:$DART_SDK/bin
echo '*********'
echo '** ENV **'
echo '*********'
echo DART_SDK=$DART_SDK
echo DART_SDK_LIB_SEARCH_PATH=$DART_SDK_LIB_SEARCH_PATH
echo DART=$DART
echo PUB=$PUB
echo DARTANALYZER=$DARTANALYZER
echo DARTDOC=$DARTDOC
echo DART_DOCGEN=$DART_DOCGEN
echo DARTIUM_BIN=$DARTIUM_BIN
echo CHROME_BIN=$CHROME_BIN
echo PATH=$PATH
echo NGDART_BASE_DIR=$NGDART_BASE_DIR
echo NGDART_SCRIPT_DIR=$NGDART_SCRIPT_DIR
fi
+1 -5
View File
@@ -1,14 +1,10 @@
#!/usr/bin/env bash
source ./scripts/ci/sources/tunnel.sh
is_dart() {
[[ "$MODE" = dart* ]]
}
is_e2e() {
[[ "$MODE" = e2e ]]
}
is_lint() {
[[ "$MODE" = lint ]]
}
}
-1
View File
@@ -4,7 +4,6 @@
echo "Connecting to Sauce Labs"
while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do
printf "."
#dart2js takes longer than the travis 10 min timeout to complete
sleep .5
done
echo