Skip to content

Commit

Permalink
chore: remove BUILD rules for building our release artifact
Browse files Browse the repository at this point in the history
I'll send a follow-up PR to simply use 'git archive' to create it, along with GitHub Actions based release automation following Google security best-practice.
  • Loading branch information
alexeagle committed Oct 29, 2023
1 parent 77bf7ab commit bb506a5
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 86 deletions.
14 changes: 0 additions & 14 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,3 @@ exports_files(
]),
visibility = ["//visibility:public"],
)

filegroup(
name = "standard_package",
srcs = glob([
"*.bzl",
"*.md",
]) + [
"MODULE.bazel",
"BUILD",
"LICENSE",
"WORKSPACE.bzlmod",
],
visibility = ["//distro:__pkg__"],
)
26 changes: 0 additions & 26 deletions distro/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,6 @@ alias(
actual = "rules_license-%s" % version,
)

# Build the artifact to put on the github release page.
pkg_tar(
name = "rules_license-%s" % version,
srcs = [
":small_workspace",
"//:standard_package",
"//licenses/generic:standard_package",
"//licenses/spdx:standard_package",
"//rules:standard_package",
"//rules_gathering:standard_package",
"//rules/private:standard_package",
"//sample_reports:standard_package",
"//tools:standard_package",
],
extension = "tar.gz",
# It is all source code, so make it read-only.
mode = "0444",
# Make it owned by root so it does not have the uid of the CI robot.
owner = "0.0",
package_dir = ".",
strip_prefix = ".",
tags = [
"no_windows",
],
)

genrule(
name = "small_workspace",
srcs = ["//:WORKSPACE"],
Expand Down
15 changes: 2 additions & 13 deletions doc_build/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,6 @@ load("//:version.bzl", "version")

package(default_package_metadata = ["//:license", "//:package_info"])

filegroup(
name = "standard_package",
srcs = [
"BUILD",
] + glob([
"*.bzl",
"*.py",
]),
visibility = ["//distro:__pkg__"],
)

exports_files(
glob([
"*.bzl",
Expand Down Expand Up @@ -91,8 +80,8 @@ bzl_library(
name = "lib_of_everything",
srcs = [
"//:version.bzl",
"//rules:standard_package",
"//rules_gathering:standard_package",
"//rules:bzl",
"//rules_gathering:bzl",
],
visibility = ["//visibility:public"],
)
Expand Down
5 changes: 0 additions & 5 deletions licenses/generic/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ package(

licenses(["notice"])

filegroup(
name = "standard_package",
srcs = ["BUILD"],
)

# "none" should be used for packages which are distributed with no license of
# any kind. You can use this no-op license as a positive indication that the
# code's license terms were reviewed, so that linters will not flag it later as
Expand Down
5 changes: 0 additions & 5 deletions licenses/spdx/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ package(

licenses(["notice"])

filegroup(
name = "standard_package",
srcs = ["BUILD"],
)

license_kind(
name = "0BSD",
conditions = [],
Expand Down
8 changes: 3 additions & 5 deletions rules/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ trace(
visibility = ["//visibility:public"],
)

# TODO(alexeagle): use gazelle to replace all these with bzl_library
filegroup(
name = "standard_package",
srcs = glob([
"**/BUILD",
"**/*.bzl",
]),
name = "bzl",
srcs = glob(["**/*.bzl"]),
)

# Do not create a bzl_library(). That would create a dependency loop back
Expand Down
5 changes: 0 additions & 5 deletions rules/private/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ package(

licenses(["notice"])

filegroup(
name = "standard_package",
srcs = glob(["**"]),
)

# Do not create a bzl_library(). That would create a dependency loop back
# to bazel-skylib. We export the .bzl files to the documentation maker.
exports_files(
Expand Down
5 changes: 3 additions & 2 deletions rules_gathering/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ package(
default_visibility = ["//visibility:public"],
)

# TODO(alexeagle): use gazelle to replace all these with bzl_library
filegroup(
name = "standard_package",
srcs = glob(["**"]),
name = "bzl",
srcs = glob(["*.bzl"]),
)

# Do not create a bzl_library(). That would create a dependency loop back
Expand Down
5 changes: 0 additions & 5 deletions sample_reports/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ package(

licenses(["notice"])

filegroup(
name = "standard_package",
srcs = glob(["**"]),
)

# Do not create a bzl_library(). That would create a dependency loop back
# to bazel-skylib. We export the .bzl files to the documentation maker.
exports_files(
Expand Down
6 changes: 0 additions & 6 deletions tools/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ package(

licenses(["notice"])

filegroup(
name = "standard_package",
srcs = glob(["**"]),
visibility = ["//distro:__pkg__"],
)

exports_files(["diff_test.sh"])

py_binary(
Expand Down

0 comments on commit bb506a5

Please sign in to comment.