From 2e55857c82aac950f0756047125f8d6eeea22b84 Mon Sep 17 00:00:00 2001 From: Yuan Gao Date: Thu, 15 Jun 2017 10:10:28 -0700 Subject: [PATCH] ci(aio): rename limits file and address comments --- aio/scripts/{payload-limit.sh => _payload-limits.sh} | 2 +- aio/scripts/payload.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) rename aio/scripts/{payload-limit.sh => _payload-limits.sh} (94%) diff --git a/aio/scripts/payload-limit.sh b/aio/scripts/_payload-limits.sh similarity index 94% rename from aio/scripts/payload-limit.sh rename to aio/scripts/_payload-limits.sh index a9e032c4ed..e619cf130b 100755 --- a/aio/scripts/payload-limit.sh +++ b/aio/scripts/_payload-limits.sh @@ -1,4 +1,4 @@ -#!/bin/bash +set -u -e -o pipefail declare -A limitUncompressed limitUncompressed=(["0"]=16000 ["inline"]=1600 ["main"]=360000 ["polyfills"]=40000 ["vendor"]=520000) diff --git a/aio/scripts/payload.sh b/aio/scripts/payload.sh index 651b7ac229..ab13663451 100755 --- a/aio/scripts/payload.sh +++ b/aio/scripts/payload.sh @@ -1,10 +1,11 @@ #!/bin/bash +set -u -e -o pipefail + readonly TOKEN=$ANGULAR_PAYLOAD_FIREBASE_TOKEN readonly PROJECT_NAME="angular-payload-size" -readonly OUTPUT_FILE=/tmp/snapshot.tar.gz -source scripts/payload-limit.sh +source scripts/_payload-limits.sh failed=false payloadData="" @@ -45,7 +46,7 @@ done timestamp=$(date +%s) payloadData="$payloadData\"timestamp\": $timestamp, " -# Add change source: local, dependencies, or 'local+dependencies' +# Add change source: application, dependencies, or 'application+dependencies' allChangedFiles=$(git diff --name-only $TRAVIS_COMMIT_RANGE) yarnChangedFiles=$(git diff --name-only $TRAVIS_COMMIT_RANGE | grep yarn.lock)