mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-13200] - Fix GH workflow e2e not affected when testing lib is modified (#8448)
* [AAE-13200] - Fix e2e not affected when testing lib is modified * Fix workflow * Fix workflow output vars
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
set -e
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
verifyLib=$1;
|
||||
deps=$2;
|
||||
cd $DIR/../../
|
||||
|
||||
if [ "${GITHUB_EVENT_NAME}" == "schedule" ]; then
|
||||
@@ -9,13 +10,27 @@ if [ "${GITHUB_EVENT_NAME}" == "schedule" ]; then
|
||||
echo true
|
||||
exit 0
|
||||
fi
|
||||
isAffected=false
|
||||
AFFECTED_LIBS=$(npx nx print-affected --type=lib --select=projects ${NX_CALCULATION_FLAGS} --plain)
|
||||
#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"
|
||||
echo true
|
||||
else
|
||||
#echo "Nope project NOT affected save time"
|
||||
echo false
|
||||
#echo "Yep project:$verifyLib is affected carry on"
|
||||
isAffected=true
|
||||
fi;
|
||||
|
||||
if [[ $isAffected == false ]]; then
|
||||
# echo "Read the deps as array"
|
||||
IFS=',' read -ra depsArray <<< "$deps"
|
||||
|
||||
#echo "Loop through the deps to check if they are affected"
|
||||
for i in "${depsArray[@]}"
|
||||
do
|
||||
if [[ $AFFECTED_LIBS =~ $i ]]; then
|
||||
isAffected=true;
|
||||
break
|
||||
fi;
|
||||
done;
|
||||
fi;
|
||||
|
||||
echo $isAffected;
|
||||
|
Reference in New Issue
Block a user