bazel_mod_deps.py 536 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env python3
  2. """Run `bazel mod deps` for pre-commit. Lets pre-commit handle modifications."""
  3. __copyright__ = """
  4. Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  5. Exceptions. See /LICENSE for license information.
  6. SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  7. """
  8. import subprocess
  9. import scripts_utils
  10. def main() -> None:
  11. scripts_utils.chdir_repo_root()
  12. bazel = scripts_utils.locate_bazel()
  13. subprocess.run([bazel, "mod", "deps"])
  14. if __name__ == "__main__":
  15. main()