Run e2e only when lib affected (#7791)

This commit is contained in:
Maurizio Vitale
2022-08-26 15:24:19 +01:00
committed by GitHub
parent c7d769510d
commit 38e9cc9f41
3 changed files with 42 additions and 22 deletions

View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
verifyLib=$1;
cd $DIR/../../
AFFECTED_LIBS="$(nx print-affected --type=lib --select=projects --base=$BASE_HASH --head=$HEAD_HASH --plain || exit 1)"
echo "Verify if affected build contains $1"
echo "Affected libs:$AFFECTED_LIBS"
if [[ $AFFECTED_LIBS =~ $verifyLib ]]; then
echo "Yep project:$verifyLib is affected carry on"
exit 0
else
echo "Nope project NOT affected save time"
exit 1
fi;