From 9263da570f1abceb2b937cec1252e3447318903c Mon Sep 17 00:00:00 2001 From: Yuan Gao Date: Fri, 30 Jun 2017 10:08:33 -0700 Subject: [PATCH] ci(aio): Fix the payload script only check for changes in aio/scripts --- aio/scripts/payload.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aio/scripts/payload.sh b/aio/scripts/payload.sh index 7c259f6d6b59f..73fb472894ec6 100755 --- a/aio/scripts/payload.sh +++ b/aio/scripts/payload.sh @@ -4,10 +4,11 @@ set +x -eu -o pipefail readonly thisDir=$(cd $(dirname $0); pwd) +readonly parentDir=$(dirname $thisDir) readonly TOKEN=${ANGULAR_PAYLOAD_FIREBASE_TOKEN:-} readonly PROJECT_NAME="angular-payload-size" -source scripts/_payload-limits.sh +source ${thisDir}/_payload-limits.sh failed=false payloadData="" @@ -43,8 +44,8 @@ payloadData="$payloadData\"timestamp\": $timestamp, " # Add change source: application, dependencies, or 'application+dependencies' yarnChanged=false -allChangedFiles=$(git diff --name-only $TRAVIS_COMMIT_RANGE $thisDir | wc -l) -allChangedFileNames=$(git diff --name-only $TRAVIS_COMMIT_RANGE $thisDir) +allChangedFiles=$(git diff --name-only $TRAVIS_COMMIT_RANGE $parentDir | wc -l) +allChangedFileNames=$(git diff --name-only $TRAVIS_COMMIT_RANGE $parentDir) if [[ $allChangedFileNames == *"yarn.lock"* ]]; then yarnChanged=true