From d5e1b310c7e634c94a462463a5f3090319337322 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 25 Jun 2024 22:51:42 -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 f158ee7d3..fd073ba9b 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