Skip to content

Commit

Permalink
impl: fix updating of strip_prefix in renovate.sh (#10946)
Browse files Browse the repository at this point in the history
`renovate.sh` knew that the editable `bazel/google_cloud_cpp_deps.bzl`
elements were terminated by the "sha256" field ... until they weren't.
(See "canonicalize the ordering of urls/sha256/strip_prefix fields"
in #10851.)

The new sed script is just as fragile, but hopefully now a little more
stable.

Also update the order of the substitution commands to match the file,
for just a little more clarity.
  • Loading branch information
devbww committed Feb 24, 2023
1 parent fff0622 commit a2a691f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions external/googleapis/renovate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ rm -f "${DOWNLOAD}"

# Update the Bazel dependency.
sed -i -f - bazel/google_cloud_cpp_deps.bzl <<EOT
/name = "com_google_googleapis",/,/sha256 = "/ {
s;/${REPO}/archive/.*.tar.gz",;/${REPO}/archive/${COMMIT}.tar.gz",;
/name = "com_google_googleapis",/,/strip_prefix = "/ {
s;/com_google_googleapis/.*.tar.gz",;/com_google_googleapis/${COMMIT}.tar.gz",;
s/strip_prefix = "googleapis-.*",/strip_prefix = "googleapis-${COMMIT}",/
s;/${REPO}/archive/.*.tar.gz",;/${REPO}/archive/${COMMIT}.tar.gz",;
s/sha256 = ".*",/sha256 = "${SHA256}",/
s/strip_prefix = "googleapis-.*",/strip_prefix = "googleapis-${COMMIT}",/
}
EOT

Expand Down

0 comments on commit a2a691f

Please sign in to comment.