mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 20:10:13 +01:00
I feel kind of weird adding a pre-commit for this, but I think it may make validating #3524 easier.
24 lines
536 B
Python
Executable File
24 lines
536 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
"""Run `bazel mod deps` for pre-commit. Lets pre-commit handle modifications."""
|
|
|
|
__copyright__ = """
|
|
Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
Exceptions. See /LICENSE for license information.
|
|
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
"""
|
|
|
|
import subprocess
|
|
|
|
import scripts_utils
|
|
|
|
|
|
def main() -> None:
|
|
scripts_utils.chdir_repo_root()
|
|
bazel = scripts_utils.locate_bazel()
|
|
subprocess.run([bazel, "mod", "deps"])
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|