6060
6161function replace_sdk_platform_java_config_version() {
6262 version=$1
63- # replace version
64- xmllint --shell <( cat pom.xml) << EOF
63+ # replace version in the shared parent POM
64+ xmllint --shell <( cat ../google-cloud-pom-parent/ pom.xml) << EOF
6565 setns x=http://maven.apache.org/POM/4.0.0
6666 cd .//x:artifactId[text()="sdk-platform-java-config"]
6767 cd ../x:version
6868 set ${version}
69- save pom.xml
69+ save ../google-cloud-pom-parent/ pom.xml
7070EOF
7171}
7272
@@ -132,16 +132,18 @@ else
132132 replace_sdk_platform_java_config_version " ${SDK_PLATFORM_JAVA_CONFIG_VERSION} "
133133fi
134134
135+ export BUILD_SUBDIR=${REPO}
136+
135137case ${JOB_TYPE} in
136138dependencies)
137- .kokoro/dependencies.sh
139+ ../. kokoro/dependencies.sh
138140 RETURN_CODE=$?
139141 ;;
140142flatten-plugin)
141143 # This creates .flattened-pom.xml
142- echo " Before running .kokoro/build.sh"
143- .kokoro/build.sh
144- echo " After running .kokoro/build.sh"
144+ echo " Before running ../. kokoro/build.sh"
145+ ../. kokoro/build.sh
146+ echo " After running ../. kokoro/build.sh"
145147 pushd google-cloud-*
146148 mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true \
147149 | grep ' \[INFO] .*:.*:.*:.*:.*' | awk ' {print $2}' > .actual-flattened-dependencies-list.txt
@@ -156,12 +158,8 @@ flatten-plugin)
156158 popd
157159 ;;
158160* )
159- # Here we replace the com.coveo fmt plugin with the spotify version.
160- # This `sed` won't be needed once downstream repositories update
161- # `.kokoro/build.sh` to use the `com.spotify.fmt` group ID.
162- sed -i ' s/com.coveo:fmt-maven-plugin/com.spotify.fmt:fmt-maven-plugin/' .kokoro/build.sh
163161 # This reads the JOB_TYPE environmental variable
164- .kokoro/build.sh
162+ ../. kokoro/build.sh
165163 RETURN_CODE=$?
166164 ;;
167165esac
0 commit comments