Skip to content

Commit

Permalink
chore(deps): adapt deps-cache.py to new google_cloud_cpp_deps.bzl (#1…
Browse files Browse the repository at this point in the history
…2017)

Adapt to the new shape of google_cloud_cpp_deps.bzl, where #11724
introduced an additional `maybe()` calling function.
  • Loading branch information
devbww committed Jul 5, 2023
1 parent 94a12df commit bfe5ef7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bazel/deps-cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,12 @@ def main():
exec(compile(f.read(), bzl, "exec"), exec_globals, exec_locals)
except Exception as e:
sys.exit(f"{bzl}: {e}")
google_cloud_cpp_deps = exec_locals.get("google_cloud_cpp_deps")
try:
google_cloud_cpp_deps(name="deps-cache") # execute .bzl definitions
except Exception as e:
sys.exit(f"google_cloud_cpp_deps(): {e}")
for f in ["google_cloud_cpp_development_deps", "google_cloud_cpp_deps"]:
func = exec_locals.get(f)
try:
func(name="deps-cache") # execute .bzl definitions
except Exception as e:
sys.exit(f"{func}(): {e}")
with tempfile.TemporaryDirectory() as tmpdir:
for archive in archives:
download(tmpdir, **archive)
Expand Down

0 comments on commit bfe5ef7

Please sign in to comment.