From 22adba4d9a3ce3e33717d59e63f87ef12a96f55a Mon Sep 17 00:00:00 2001 From: Mike Aizatsky Date: Mon, 11 Nov 2024 10:36:55 -0800 Subject: [PATCH] [nfc] move buildifier to update_deps (#3091) --- WORKSPACE | 34 --------------- build/deps/build_deps.jsonc | 41 +++++++++++++++++++ build/deps/gen/build_deps.bzl | 10 +++++ .../deps/gen/dep_buildifier_darwin_amd64.bzl | 15 +++++++ .../deps/gen/dep_buildifier_darwin_arm64.bzl | 15 +++++++ build/deps/gen/dep_buildifier_linux_amd64.bzl | 15 +++++++ build/deps/gen/dep_buildifier_linux_arm64.bzl | 15 +++++++ .../deps/gen/dep_buildifier_windows_amd64.bzl | 15 +++++++ 8 files changed, 126 insertions(+), 34 deletions(-) create mode 100644 build/deps/gen/dep_buildifier_darwin_amd64.bzl create mode 100644 build/deps/gen/dep_buildifier_darwin_arm64.bzl create mode 100644 build/deps/gen/dep_buildifier_linux_amd64.bzl create mode 100644 build/deps/gen/dep_buildifier_linux_arm64.bzl create mode 100644 build/deps/gen/dep_buildifier_windows_amd64.bzl diff --git a/WORKSPACE b/WORKSPACE index 61eb3c6e7f9..e2e365424c9 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -398,40 +398,6 @@ new_local_repository( ) # Dev tools -http_file( - name = "buildifier-darwin-arm64", - executable = True, - integrity = "sha256-Wmr8asegn1RVuguJvZnVriO0F03F3J1sDtXOjKrD+BM=", - url = "https://github.com/bazelbuild/buildtools/releases/download/v7.3.1/buildifier-darwin-arm64", -) - -http_file( - name = "buildifier-darwin-amd64", - executable = True, - integrity = "sha256-Wmr8asegn1RVuguJvZnVriO0F03F3J1sDtXOjKrD+BM=", - url = "https://github.com/bazelbuild/buildtools/releases/download/v7.3.1/buildifier-darwin-arm64", -) - -http_file( - name = "buildifier-linux-arm64", - executable = True, - integrity = "sha256-C/hsS//69PCO7Xe95bIILkrlA5oR4uiwOYTBc8NKVhw=", - url = "https://github.com/bazelbuild/buildtools/releases/download/v7.3.1/buildifier-linux-arm64", -) - -http_file( - name = "buildifier-linux-amd64", - executable = True, - integrity = "sha256-VHTMUSinToBng9VAgfWBZixL6K5lAi9VfpKB7V3IgAk=", - url = "https://github.com/bazelbuild/buildtools/releases/download/v7.3.1/buildifier-linux-amd64", -) - -http_file( - name = "buildifier-windows-amd64", - executable = True, - integrity = "sha256-NwzVdgda0pkwqC9d4TLxod5AhMeEqCUUvU2oDIWs9Kg=", - url = "https://github.com/bazelbuild/buildtools/releases/download/v7.3.1/buildifier-windows-amd64.exe", -) FILE_GROUP = """filegroup( name="file", diff --git a/build/deps/build_deps.jsonc b/build/deps/build_deps.jsonc index 7df1f203460..a7f710783a5 100644 --- a/build/deps/build_deps.jsonc +++ b/build/deps/build_deps.jsonc @@ -119,6 +119,47 @@ "owner": "aspect-build", "repo": "rules_ts", "file_regex": "^rules_ts-" + }, + //buildifier + { + "name": "buildifier-linux-amd64", + "type": "github_release", + "owner": "bazelbuild", + "repo": "buildtools", + "file_regex": "^buildifier-linux-amd64$", + "file_type": "executable" + }, + { + "name": "buildifier-linux-arm64", + "type": "github_release", + "owner": "bazelbuild", + "repo": "buildtools", + "file_regex": "^buildifier-linux-arm64$", + "file_type": "executable" + }, + { + "name": "buildifier-darwin-amd64", + "type": "github_release", + "owner": "bazelbuild", + "repo": "buildtools", + "file_regex": "^buildifier-darwin-amd64$", + "file_type": "executable" + }, + { + "name": "buildifier-darwin-arm64", + "type": "github_release", + "owner": "bazelbuild", + "repo": "buildtools", + "file_regex": "^buildifier-darwin-arm64$", + "file_type": "executable" + }, + { + "name": "buildifier-windows-amd64", + "type": "github_release", + "owner": "bazelbuild", + "repo": "buildtools", + "file_regex": "^buildifier-windows-amd64.exe$", + "file_type": "executable" } ] } diff --git a/build/deps/gen/build_deps.bzl b/build/deps/gen/build_deps.bzl index 05103f61fb7..cf37a2549dc 100644 --- a/build/deps/gen/build_deps.bzl +++ b/build/deps/gen/build_deps.bzl @@ -6,6 +6,11 @@ load("@//build/deps:gen/dep_aspect_rules_js.bzl", "dep_aspect_rules_js") load("@//build/deps:gen/dep_aspect_rules_ts.bzl", "dep_aspect_rules_ts") load("@//build/deps:gen/dep_bazel_skylib.bzl", "dep_bazel_skylib") load("@//build/deps:gen/dep_build_bazel_apple_support.bzl", "dep_build_bazel_apple_support") +load("@//build/deps:gen/dep_buildifier_darwin_amd64.bzl", "dep_buildifier_darwin_amd64") +load("@//build/deps:gen/dep_buildifier_darwin_arm64.bzl", "dep_buildifier_darwin_arm64") +load("@//build/deps:gen/dep_buildifier_linux_amd64.bzl", "dep_buildifier_linux_amd64") +load("@//build/deps:gen/dep_buildifier_linux_arm64.bzl", "dep_buildifier_linux_arm64") +load("@//build/deps:gen/dep_buildifier_windows_amd64.bzl", "dep_buildifier_windows_amd64") load("@//build/deps:gen/dep_cargo_bazel_linux_arm64.bzl", "dep_cargo_bazel_linux_arm64") load("@//build/deps:gen/dep_cargo_bazel_linux_x64.bzl", "dep_cargo_bazel_linux_x64") load("@//build/deps:gen/dep_cargo_bazel_macos_arm64.bzl", "dep_cargo_bazel_macos_arm64") @@ -32,3 +37,8 @@ def deps_gen(): dep_aspect_bazel_lib() dep_aspect_rules_js() dep_aspect_rules_ts() + dep_buildifier_linux_amd64() + dep_buildifier_linux_arm64() + dep_buildifier_darwin_amd64() + dep_buildifier_darwin_arm64() + dep_buildifier_windows_amd64() diff --git a/build/deps/gen/dep_buildifier_darwin_amd64.bzl b/build/deps/gen/dep_buildifier_darwin_amd64.bzl new file mode 100644 index 00000000000..b030e191c69 --- /dev/null +++ b/build/deps/gen/dep_buildifier_darwin_amd64.bzl @@ -0,0 +1,15 @@ +# WARNING: THIS FILE IS AUTOGENERATED BY update-deps.py DO NOT EDIT + +load("@//:build/http.bzl", "http_file") + +TAG_NAME = "v7.3.1" +URL = "https://github.com/bazelbuild/buildtools/releases/download/v7.3.1/buildifier-darwin-amd64" +SHA256 = "375f823103d01620aaec20a0c29c6cbca99f4fd0725ae30b93655c6704f44d71" + +def dep_buildifier_darwin_amd64(): + http_file( + name = "buildifier-darwin-amd64", + url = URL, + executable = True, + sha256 = SHA256, + ) diff --git a/build/deps/gen/dep_buildifier_darwin_arm64.bzl b/build/deps/gen/dep_buildifier_darwin_arm64.bzl new file mode 100644 index 00000000000..7201ac3d5b5 --- /dev/null +++ b/build/deps/gen/dep_buildifier_darwin_arm64.bzl @@ -0,0 +1,15 @@ +# WARNING: THIS FILE IS AUTOGENERATED BY update-deps.py DO NOT EDIT + +load("@//:build/http.bzl", "http_file") + +TAG_NAME = "v7.3.1" +URL = "https://github.com/bazelbuild/buildtools/releases/download/v7.3.1/buildifier-darwin-arm64" +SHA256 = "5a6afc6ac7a09f5455ba0b89bd99d5ae23b4174dc5dc9d6c0ed5ce8caac3f813" + +def dep_buildifier_darwin_arm64(): + http_file( + name = "buildifier-darwin-arm64", + url = URL, + executable = True, + sha256 = SHA256, + ) diff --git a/build/deps/gen/dep_buildifier_linux_amd64.bzl b/build/deps/gen/dep_buildifier_linux_amd64.bzl new file mode 100644 index 00000000000..04bc02f4aa4 --- /dev/null +++ b/build/deps/gen/dep_buildifier_linux_amd64.bzl @@ -0,0 +1,15 @@ +# WARNING: THIS FILE IS AUTOGENERATED BY update-deps.py DO NOT EDIT + +load("@//:build/http.bzl", "http_file") + +TAG_NAME = "v7.3.1" +URL = "https://github.com/bazelbuild/buildtools/releases/download/v7.3.1/buildifier-linux-amd64" +SHA256 = "5474cc5128a74e806783d54081f581662c4be8ae65022f557e9281ed5dc88009" + +def dep_buildifier_linux_amd64(): + http_file( + name = "buildifier-linux-amd64", + url = URL, + executable = True, + sha256 = SHA256, + ) diff --git a/build/deps/gen/dep_buildifier_linux_arm64.bzl b/build/deps/gen/dep_buildifier_linux_arm64.bzl new file mode 100644 index 00000000000..da1cf660f63 --- /dev/null +++ b/build/deps/gen/dep_buildifier_linux_arm64.bzl @@ -0,0 +1,15 @@ +# WARNING: THIS FILE IS AUTOGENERATED BY update-deps.py DO NOT EDIT + +load("@//:build/http.bzl", "http_file") + +TAG_NAME = "v7.3.1" +URL = "https://github.com/bazelbuild/buildtools/releases/download/v7.3.1/buildifier-linux-arm64" +SHA256 = "0bf86c4bfffaf4f08eed77bde5b2082e4ae5039a11e2e8b03984c173c34a561c" + +def dep_buildifier_linux_arm64(): + http_file( + name = "buildifier-linux-arm64", + url = URL, + executable = True, + sha256 = SHA256, + ) diff --git a/build/deps/gen/dep_buildifier_windows_amd64.bzl b/build/deps/gen/dep_buildifier_windows_amd64.bzl new file mode 100644 index 00000000000..05187b27b35 --- /dev/null +++ b/build/deps/gen/dep_buildifier_windows_amd64.bzl @@ -0,0 +1,15 @@ +# WARNING: THIS FILE IS AUTOGENERATED BY update-deps.py DO NOT EDIT + +load("@//:build/http.bzl", "http_file") + +TAG_NAME = "v7.3.1" +URL = "https://github.com/bazelbuild/buildtools/releases/download/v7.3.1/buildifier-windows-amd64.exe" +SHA256 = "370cd576075ad29930a82f5de132f1a1de4084c784a82514bd4da80c85acf4a8" + +def dep_buildifier_windows_amd64(): + http_file( + name = "buildifier-windows-amd64", + url = URL, + executable = True, + sha256 = SHA256, + )