3 # Copyright 2016-2017 Huawei Technologies Co., Ltd.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
18 # autorelease root dir
19 ROOT=`git rev-parse --show-toplevel`/autorelease
22 JJB_DIR=$BUILD_DIR/ci-management/jjb
26 source $ROOT/scripts/generate-jjbs/workarounds.sh
32 mkdir -p $TMPDIR/merge-jobs
33 find . -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | sort | while read repo; do
35 OUTFILE=$TMPDIR/merge-jobs/${repo}.txt
38 for r in "${SPLIT_REPOS[@]}"; do
39 if [ "$repo" = "$r" ]; then
44 if [ $has_subprojects -eq 1 ]; then
45 poms=`find $repo -mindepth 1 -type d -exec test -e "{}/pom.xml" ';' -prune -printf "%P/pom.xml\n" | sort`
47 poms=`find $repo -type d -exec test -e "{}/pom.xml" ';' -prune -printf "%P/pom.xml\n" | sort`
48 if [ "$poms" != "/pom.xml" ]; then
54 if [ $has_subprojects -eq 0 ]; then
55 echo ${repo}-master-merge-java > $OUTFILE
56 elif [ ! -z "$poms" ]; then
58 pompath=${pom%/pom.xml}
59 subproject=${pompath////-} # replace slash with dash
60 echo ${repo}-master-${subproject}-merge-java >> $OUTFILE