ci(aio): address comments
This commit is contained in:
parent
97ace57d39
commit
d51f86291f
|
@ -42,14 +42,12 @@ payloadData="$payloadData\"timestamp\": $timestamp, "
|
||||||
|
|
||||||
# Add change source: application, dependencies, or 'application+dependencies'
|
# Add change source: application, dependencies, or 'application+dependencies'
|
||||||
yarnChanged=false
|
yarnChanged=false
|
||||||
allChangedFiles=$(git diff --name-only $TRAVIS_COMMIT_RANGE | grep -c "")
|
allChangedFiles=$(git diff --name-only $TRAVIS_COMMIT_RANGE ./ | wc -l)
|
||||||
allChangedFileNames=$(git diff --name-only $TRAVIS_COMMIT_RANGE)
|
allChangedFileNames=$(git diff --name-only $TRAVIS_COMMIT_RANGE ./)
|
||||||
|
|
||||||
if [[ $allChangedFileNames == *"yarn.lock"* ]]; then
|
if [[ $allChangedFileNames == *"yarn.lock"* ]]; then
|
||||||
yarnChanged=true
|
yarnChanged=true
|
||||||
fi
|
fi
|
||||||
echo $yarnChanged
|
|
||||||
echo $allChangedFileNames
|
|
||||||
|
|
||||||
if [[ $allChangedFiles -eq 1 ]] && [[ "$yarnChanged" = true ]]; then
|
if [[ $allChangedFiles -eq 1 ]] && [[ "$yarnChanged" = true ]]; then
|
||||||
# only yarn.lock changed
|
# only yarn.lock changed
|
||||||
|
@ -59,7 +57,8 @@ elif [[ $allChangedFiles -gt 1 ]] && [[ "$yarnChanged" = true ]]; then
|
||||||
elif [[ $allChangedFiles -gt 0 ]]; then
|
elif [[ $allChangedFiles -gt 0 ]]; then
|
||||||
change='application'
|
change='application'
|
||||||
else
|
else
|
||||||
change=''
|
# Nothing changed in aio/
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
payloadData="$payloadData\"change\": \"$change\""
|
payloadData="$payloadData\"change\": \"$change\""
|
||||||
|
|
||||||
|
@ -68,7 +67,7 @@ payloadData="{${payloadData}}"
|
||||||
echo $payloadData
|
echo $payloadData
|
||||||
|
|
||||||
if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
|
if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
|
||||||
firebase database:update --data "$payloadData" --project $PROJECT_NAME --confirm --token "$TOKEN" /payload/aio/$TRAVIS_COMMIT
|
firebase database:update --data "$payloadData" --project $PROJECT_NAME --confirm --token "$TOKEN" /payload/aio/$TRAVIS_BRANCH/$TRAVIS_COMMIT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $failed = true ]]; then
|
if [[ $failed = true ]]; then
|
||||||
|
|
Loading…
Reference in New Issue