ci(aio): remove umd

This commit is contained in:
Yuan Gao 2017-06-16 16:25:42 -07:00 committed by Matias Niemelä
parent 6924780ae9
commit 86949e0c20
2 changed files with 6 additions and 15 deletions

View File

@ -31,13 +31,13 @@ esac
# Build the app
yarn build -- --env=$buildEnv
# Check payload size
yarn payload-size
# Deploy to Firebase
firebase use "$projectId" --token "$firebaseToken"
firebase deploy --message "Commit: $TRAVIS_COMMIT" --non-interactive --token "$firebaseToken"
# Check payload size
yarn payload-size
# Run PWA-score tests
yarn test-pwa-score -- "$deployedUrl" "$MIN_PWA_SCORE" "$PWA_RESULTS_LOG"
)

View File

@ -1,6 +1,7 @@
#!/bin/bash
set -e -o pipefail
# WARNING: FIREBASE_TOKEN should NOT be printed.
set +x -eu -o pipefail
readonly TOKEN=${ANGULAR_PAYLOAD_FIREBASE_TOKEN:-}
readonly PROJECT_NAME="angular-payload-size"
@ -35,23 +36,13 @@ for filename in dist/*.bundle.js; do
fi
done
# Also track sizes of bundle/*umd.min.js files
for filename in node_modules/@angular/*/bundles/*.umd.min.js; do
size=$(stat -c%s "$filename")
label=$(echo "$filename" | sed "s/.*\///" | sed "s/\..*//")
payloadData="$payloadData\"umd/$label\": $size, "
done
# Add Timestamp
timestamp=$(date +%s)
payloadData="$payloadData\"timestamp\": $timestamp, "
echo $TRAVIS_COMMIT_RANGE
# Add change source: application, dependencies, or 'application+dependencies'
allChangedFiles=$(git diff --name-only $TRAVIS_COMMIT_RANGE)
echo $allChangedFiles
yarnChangedFiles=$(git diff --name-only $TRAVIS_COMMIT_RANGE | grep yarn.lock)
echo $yarnChangedFiles
yarnChangedFiles=$(grep yarn.lock <<< $allChangedFiles)
if [[ ! -z $allChangedFiles ]] && [[ ! -z $yarnChangedFiles ]] && [ "$allChangedFiles" != "$yarnChangedFiles" ]; then
change='application+dependencies'