From d7cb1bde17cdfc0d77b305b008372010d9840060 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 25 Jun 2024 22:52:39 -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 b84f6ef2b..2c0e63bdb 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