Skip to content

Commit 90c9a7a

Browse files
committed
use install_modules already implemented
1 parent 51690fc commit 90c9a7a

File tree

3 files changed

+2
-335
lines changed

3 files changed

+2
-335
lines changed

.kokoro/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fi
3636
if [[ -n "${BUILD_SUBDIR}" ]]
3737
then
3838
echo "Compiling and building all modules for ${BUILD_SUBDIR}"
39-
install_dependencies "${BUILD_SUBDIR}"
39+
install_modules "${BUILD_SUBDIR}"
4040
echo "Running in subdir: ${BUILD_SUBDIR}"
4141
pushd "${BUILD_SUBDIR}"
4242
fi

.kokoro/common.sh

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,8 @@ function retry_with_backoff {
5656
# Given a folder containing a maven multi-module, assign the variable 'submodules' to a
5757
# comma-delimited list of <folder>/<submodule>.
5858
function parse_submodules() {
59-
pushd "$1" >/dev/null
60-
6159
submodules_array=()
62-
mvn_submodules=$(mvn help:evaluate -Dexpression=project.modules)
60+
mvn_submodules=$(mvn help:evaluate -Dexpression=project.modules -pl "$1")
6361
if mvn_submodules=$(grep '<.*>.*</.*>' <<< "$mvn_submodules"); then
6462
mvn_submodules=$(sed -e 's/<.*>\(.*\)<\/.*>/\1/g' <<< "$mvn_submodules")
6563
for submodule in $mvn_submodules; do
@@ -77,8 +75,6 @@ function parse_submodules() {
7775
echo "${submodules_array[*]}"
7876
)
7977
export submodules
80-
81-
popd >/dev/null
8278
}
8379

8480
# Given a list of folders containing maven multi-modules, assign the variable 'all_submodules' to a
@@ -347,15 +343,3 @@ function install_modules() {
347343
-T 1C
348344
fi
349345
}
350-
351-
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
352-
root_dir=$(realpath "$scriptDir/..")
353-
function install_dependencies() {
354-
target_module_path=$(realpath "$1")
355-
rel_target_path=$(realpath --relative-to="$root_dir" "$target_module_path")
356-
echo "Resolving dependencies for $rel_target_path..."
357-
dependencies=$(python3 "$scriptDir/determine_dependencies.py" "$1")
358-
echo "Found dependencies: $dependencies"
359-
360-
install_modules "${dependencies}"
361-
}

.kokoro/determine_dependencies.py

Lines changed: 0 additions & 317 deletions
This file was deleted.

0 commit comments

Comments
 (0)