2
0
Fork 0
mirror of https://github.com/bazelbuild/bazel-skylib synced 2024-11-28 08:43:51 +00:00
bazel-skylib/distribution/BUILD
nickgooding 31ab4c8bd2
feat: bzlmod setup (#385)
Creates MODULE.bazel and WORKSPACE.bzlmod files to enable bazel-skylib
to work with the `--experimental_enable_bzlmod` flag.

rules_go has been updated as the previously used version is not
available in the BCR.

stardoc has been updated due to a strange issue with Bzlmod enabled that
caused the `diff_test` and `unittest` docs to be generated without any
contents that was magically fixed upon updating.

bazelbuild/bazel-central-registry#124

Co-authored-by: Alexandre Rostovtsev <arostovtsev@google.com>
2022-08-30 14:57:34 -04:00

38 lines
941 B
Python

load("@bazel_skylib//:version.bzl", "version")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
load("@rules_pkg//releasing:defs.bzl", "print_rel_notes")
package(
default_visibility = ["//visibility:private"],
)
genrule(
name = "distro_module_bazel",
srcs = ["//:MODULE.bazel"],
outs = ["MODULE.bazel"],
cmd = "sed -e '/### INTERNAL ONLY/,$$d' $(location //:MODULE.bazel) >$@",
)
# Build the artifact to put on the github release page.
pkg_tar(
name = "bazel-skylib-%s" % version,
srcs = [
"distro_module_bazel",
"//:distribution",
],
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 = ".",
)
print_rel_notes(
name = "relnotes",
outs = ["relnotes.txt"],
deps_method = "bazel_skylib_workspace",
repo = "bazel-skylib",
setup_file = ":workspace.bzl",
version = version,
)