From f134e3f8dcd16f7848869f0c71dc82e66cd1b384 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 25 Jun 2024 22:53:33 -0400 Subject: [PATCH] chore: Use sed --- .kokoro/build.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index edd63ef08..b00d81d0e 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -89,9 +89,11 @@ if [[ "${CURRENT_PROTO_VERSION}" != "${LATEST_PROTO_VERSION}" ]]; then for pom in "${poms[@]}"; do if grep -q "sdk-platform-java-config" "${pom}"; then echo "Updating the pom: ${pom} to use shared-deps version: ${SHARED_DEPS_VERSION}" - sed -i -E "/com.google.cloud<\/groupId>.*sdk-platform-java-config<\/artifactId>/ { - s/()[^<]+(<\/version>)/\1${SHARED_DEPS_VERSION}\2/ - }" "${pom}" + sed -i "/sdk-platform-java-config<\/artifactId>/,/<\/parent>/ s/.*<\/version>/$SHARED_DEPS_VERSION<\/version>/" "${pom}" +# xmlstarlet ed --inplace -N x="http://maven.apache.org/POM/4.0.0" \ +# -u "//x:project/x:parent[x:artifactId='sdk-platform-java-config']/x:version" \ +# -v "${SHARED_DEPS_VERSION}" \ +# "${pom}" fi done fi