Skip to content

Commit

Permalink
chore: Use sed
Browse files Browse the repository at this point in the history
  • Loading branch information
lqiu96 committed Jun 26, 2024
1 parent 40388c6 commit d45c4d5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "/<groupId>com.google.cloud<\/groupId>.*<artifactId>sdk-platform-java-config<\/artifactId>/ {
s/(<version>)[^<]+(<\/version>)/\1${SHARED_DEPS_VERSION}\2/
}" "${pom}"
sed -i "/<artifactId>sdk-platform-java-config<\/artifactId>/,/<\/parent>/ s/<version>.*<\/version>/<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
Expand Down

0 comments on commit d45c4d5

Please sign in to comment.