aboutsummaryrefslogtreecommitdiff
path: root/distribution/BUILD
diff options
context:
space:
mode:
Diffstat (limited to 'distribution/BUILD')
-rw-r--r--distribution/BUILD44
1 files changed, 33 insertions, 11 deletions
diff --git a/distribution/BUILD b/distribution/BUILD
index 326cee7..8762525 100644
--- a/distribution/BUILD
+++ b/distribution/BUILD
@@ -1,6 +1,6 @@
load("@bazel_skylib//:version.bzl", "version")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
-load("@rules_pkg//releasing:defs.bzl", "print_rel_notes")
+load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
package(
default_visibility = ["//visibility:private"],
@@ -13,25 +13,47 @@ genrule(
cmd = "sed -e '/### INTERNAL ONLY/,$$d' $(location //:MODULE.bazel) >$@",
)
-# Build the artifact to put on the github release page.
+# Build the artifacts to put on the github release page.
pkg_tar(
- name = "bazel-skylib-%s" % version,
+ name = "bazel-skylib",
srcs = [
"distro_module_bazel",
"//:distribution",
],
+ out = "bazel-skylib-%s.tar.gz" % version,
extension = "tar.gz",
mode = "0644",
# Make it owned by root so it does not have the uid of the CI robot.
owner = "0.0",
- strip_prefix = ".",
+ strip_prefix = strip_prefix.from_root(),
)
-print_rel_notes(
- name = "relnotes",
- outs = ["relnotes.txt"],
- deps_method = "bazel_skylib_workspace",
- repo = "bazel-skylib",
- setup_file = ":workspace.bzl",
- version = version,
+pkg_files(
+ name = "bazel-skylib-gazelle-plugin-without-external-prefix",
+ srcs = [
+ "@bazel_skylib_gazelle_plugin//:distribution",
+ "@bazel_skylib_gazelle_plugin//bzl:distribution",
+ ],
+ strip_prefix = strip_prefix.from_root(),
+)
+
+pkg_tar(
+ name = "bazel-skylib-gazelle-plugin",
+ srcs = [
+ ":bazel-skylib-gazelle-plugin-without-external-prefix",
+ "//:LICENSE",
+ ],
+ out = "bazel-skylib-gazelle-plugin-%s.tar.gz" % version,
+ extension = "tar.gz",
+ mode = "0644",
+ # Make it owned by root so it does not have the uid of the CI robot.
+ owner = "0.0",
+)
+
+filegroup(
+ name = "distribution",
+ srcs = [
+ "bazel-skylib",
+ "bazel-skylib-gazelle-plugin",
+ ],
)