[ADF-4125] simplify extension load in extension module (#4214)

* add extension load in extension module

* add viewer extensions

* fix license header

* fix node passed in the viewer extension

* fix node passed in the viewer extension

* startup factory extension

* startup factory extension

* fix script

* fix beta tag build

* fix build

* fix build

* refactoring configuration files

* extension using map

* fix build

* fix config

* fix test

* fix test
This commit is contained in:
Eugenio Romano
2019-02-22 14:19:41 +00:00
committed by GitHub
parent bf4d1a2806
commit bda7e07b52
92 changed files with 1035 additions and 785 deletions

View File

@@ -4,11 +4,18 @@ eval BRANCH_NAME=""
eval HEAD_SHA_BRANCH=""
eval SHA_2="HEAD"
eval DIRECTORY="tmp"
eval GNU=false
show_help() {
echo "Usage: smart-build.sh"
echo "Usage: affected-libs.sh"
echo ""
echo "-b branch name"
echo "-gnu for gnu"
}
gnu_mode() {
echo "====== GNU MODE ====="
GNU=true
}
branch_name(){
@@ -18,10 +25,18 @@ branch_name(){
while [[ $1 == -* ]]; do
case "$1" in
-b) branch_name $2; shift 2;;
-gnu) gnu_mode; shift;;
-*) echo "invalid option: $1" 1>&2; show_help; exit 0;;
esac
done
if $GNU; then
sedi='-i'
else
sedi=('-i' '')
fi
if [[ "$BRANCH_NAME" == "" ]]
then
echo "The branch name is mandatory"
@@ -47,10 +62,10 @@ cat $DIRECTORY/deps.txt
#echo "extensions" > deps.txt
#clean file
sed -i '/^$/d' ./$DIRECTORY/deps.txt
sed -i '/alfresco-components/d' ./$DIRECTORY/deps.txt
sed -i '/nx affected:libs/d' ./$DIRECTORY/deps.txt
sed -i '/^$/d' ./$DIRECTORY/deps.txt
sed "${sedi[@]}" '/^$/d' ./$DIRECTORY/deps.txt
sed "${sedi[@]}" '/alfresco-components/d' ./$DIRECTORY/deps.txt
sed "${sedi[@]}" '/nx affected:libs/d' ./$DIRECTORY/deps.txt
sed "${sedi[@]}" '/^$/d' ./$DIRECTORY/deps.txt
#read result from file
while IFS= read -r var
@@ -61,6 +76,14 @@ done < "./$DIRECTORY/deps.txt"
#transform string to array
libs=(`echo $fileLine | sed 's/^$/\n/g'`)
#extensions
for i in "${libs[@]}"
do
if [ "$i" == "extensions" ] ; then
AFFECTED_LIBS=$AFFECTED_LIBS" extensions$"
fi
done
#core
for i in "${libs[@]}"
do
@@ -95,14 +118,6 @@ do
fi
done
#extensions
for i in "${libs[@]}"
do
if [ "$i" == "extensions" ] ; then
AFFECTED_LIBS=$AFFECTED_LIBS" extensions$"
fi
done
#process-services-cloud
for i in "${libs[@]}"
do
@@ -111,4 +126,4 @@ do
fi
done
echo "${AFFECTED_LIBS}"
echo "AFFECTED LIBS => ${AFFECTED_LIBS}"