From 97e6901dedbc08915974bb5da84c71cd1059af22 Mon Sep 17 00:00:00 2001 From: Alex Rickabaugh Date: Fri, 14 Jul 2017 14:54:31 -0700 Subject: [PATCH] Revert "revert: revert: ci(aio): exclude changes in aio/content folder" This reverts commit 3d85f72652afb84ef8f99dba282c5ea05e93d386. Still causing repeated flakes on master. --- aio/scripts/payload.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/aio/scripts/payload.sh b/aio/scripts/payload.sh index 0353f8de16..f0102a0491 100755 --- a/aio/scripts/payload.sh +++ b/aio/scripts/payload.sh @@ -45,15 +45,20 @@ timestamp=$(date +%s) payloadData="$payloadData\"timestamp\": $timestamp, " # Add change source: application, dependencies, or 'application+dependencies' -applicationChanges=$(git diff --name-only $TRAVIS_COMMIT_RANGE $parentDir | grep -v ${parentDir}/content | grep -v ${parentDir}/yarn.lock | wc -l) -dependencyChanges=$(git diff --name-only $TRAVIS_COMMIT_RANGE ${parentDir}/yarn.lock | wc -l) +yarnChanged=false +allChangedFiles=$(git diff --name-only $TRAVIS_COMMIT_RANGE $parentDir | wc -l) +allChangedFileNames=$(git diff --name-only $TRAVIS_COMMIT_RANGE $parentDir) -if [[ $dependencyChanges -eq 1 ]] && [[ $applicationChanges -eq 0 ]]; then +if [[ $allChangedFileNames == *"yarn.lock"* ]]; then + yarnChanged=true +fi + +if [[ $allChangedFiles -eq 1 ]] && [[ "$yarnChanged" = true ]]; then # only yarn.lock changed change='dependencies' -elif [[ $dependencyChanges -eq 1 ]] && [[ $applicationChanges -gt 0 ]]; then +elif [[ $allChangedFiles -gt 1 ]] && [[ "$yarnChanged" = true ]]; then change='application+dependencies' -elif [[ $applicationChanges -gt 0 ]]; then +elif [[ $allChangedFiles -gt 0 ]]; then change='application' else # Nothing changed in aio/