Add possibility to use different branches for dependencies

This commit is contained in:
pzurek
2023-06-20 08:19:14 +02:00
parent 32f88bd2fd
commit e48c68c86c

View File

@@ -9,11 +9,12 @@ mvn -f $DEPENDENCIES_DIR -B clean install
function clone_and_install {
local project_path=$DEPENDENCIES_DIR/projects/$1
local branch_name=${2:-jakarta-migration}
if [ ! -d "$project_path" ]; then
if [ -z "$HTTP_CREDENTIALS" ]; then
git clone --single-branch --branch jakarta-migration git@github.com:Alfresco/$1.git $project_path
git clone --single-branch --branch $branch_name git@github.com:Alfresco/$1.git $project_path
else
git clone --single-branch --branch jakarta-migration https://${HTTP_CREDENTIALS}@github.com/Alfresco/$1.git $project_path
git clone --single-branch --branch $branch_name https://${HTTP_CREDENTIALS}@github.com/Alfresco/$1.git $project_path
fi
fi
mvn -f $project_path -B clean install -DskipTests -Dmaven.javadoc.skip=true