Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branch OptaPlanner 8: shell script changes #1376

Merged
merged 9 commits into from
Jul 1, 2020
1 change: 1 addition & 0 deletions script/branched-7-repository-list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optaplanner
14 changes: 11 additions & 3 deletions script/git-clone-others.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ additionalGitOptions=()

# default repository list is stored in the repository-list.txt file
REPOSITORY_LIST=`cat "${scriptDir}/repository-list.txt"`
# Repositories that need to use the branch 7.x instead of master
BRANCHED_7_REPOSITORY_LIST=`cat "${scriptDir}/branched-7-repository-list.txt"`

for arg in "$@"
do
Expand Down Expand Up @@ -105,6 +107,11 @@ for repository in $REPOSITORY_LIST ; do
fi
git clone ${additionalGitOptions[@]} ${gitUrlPrefix}${repository}.git ${repository}

ge0ffrey marked this conversation as resolved.
Show resolved Hide resolved
returnCode=$?
if [ $returnCode != 0 ] ; then
exit $returnCode
fi

if [ "$UPSTREAM" = true ]; then
upstreamGitUrlPrefix=`echo ${gitUrlPrefix} | sed 's|\(.*github\.com[:/]\).*|\1kiegroup/|'`
echo -- adding upstream remote "${upstreamGitUrlPrefix}${repository}.git"
Expand All @@ -113,9 +120,10 @@ for repository in $REPOSITORY_LIST ; do
cd ..
fi

returnCode=$?
if [ $returnCode != 0 ] ; then
exit $returnCode
if [ `echo "$BRANCHED_7_REPOSITORY_LIST" | grep "^$repository$"` ] ; then
cd ${repository}
git checkout 7.x
ge0ffrey marked this conversation as resolved.
Show resolved Hide resolved
cd ..
fi
fi
done
Expand Down
8 changes: 6 additions & 2 deletions script/utils/revapi-clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
# How to clean ignores in revapi-config.json files:
#
# export REVAPI_REPOSITORIES=droolsjbpm-build-bootstrap,droolsjbpm-knowledge,drools,jbpm,droolsjbpm-integration,optaplanner
# export MASTER_REVAPI_REPOSITORIES=droolsjbpm-build-bootstrap,droolsjbpm-knowledge,drools,jbpm,droolsjbpm-integration
# export BRANCHED_7_REVAPI_REPOSITORIES=optaplanner
ge0ffrey marked this conversation as resolved.
Show resolved Hide resolved
#
# ./git-clone-others.sh --repo-list=$REVAPI_REPOSITORIES --add-upstream-remote
# ./git-all.sh --repo-list=$REVAPI_REPOSITORIES checkout master
# ./git-all.sh --repo-list=$REVAPI_REPOSITORIES pull --rebase upstream master
# ./git-all.sh --repo-list=MASTER_REVAPI_REPOSITORIES checkout master
# ./git-all.sh --repo-list=MASTER_REVAPI_REPOSITORIES pull --rebase upstream master
# ./git-all.sh --repo-list=BRANCHED_7_REVAPI_REPOSITORIES checkout 7.x
# ./git-all.sh --repo-list=BRANCHED_7_REVAPI_REPOSITORIES pull --rebase upstream 7.x
# ./git-all.sh --repo-list=$REVAPI_REPOSITORIES checkout -b revapi-7.23.0.Final
# Copy this script to root of all repositories and run it there, ./revapi-clean.sh 7.23.0.Final
# Update <revapi.oldKieVersion> in kie-parent
Expand Down