aboutsummaryrefslogtreecommitdiff
path: root/distro/BUILD
blob: a94746506bafa9ffccb2e9edf291e00b685ec761 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
load("@io_bazel_stardoc//:version.bzl", "version")
load("@rules_pkg//:pkg.bzl", "pkg_tar")

package(
    default_visibility = ["//visibility:private"],
)

alias(
    name = "distro",
    actual = "stardoc-%s" % version,
)

genrule(
    name = "distro_workspace",
    srcs = ["//:WORKSPACE"],
    outs = ["WORKSPACE"],
    cmd = "sed -e '/### INTERNAL ONLY/,$$d' $(location //:WORKSPACE) >$@",
)

pkg_tar(
    name = "distro_srcs",
    srcs = [
        "distro_workspace",
        "//:distro_srcs",
    ],
    mode = "0644",
    # Make it owned by root so it does not have the uid of the CI robot.
    owner = "0.0",
    package_dir = "",
    strip_prefix = ".",
)

pkg_tar(
    name = "distro_bins",
    srcs = ["//:distro_bins"],
    mode = "0755",
    # Make it owned by root so it does not have the uid of the CI robot.
    owner = "0.0",
    package_dir = "",
    strip_prefix = ".",
)

# Build the artifact to put on the github release page.
pkg_tar(
    name = "stardoc-%s" % version,
    extension = "tar.gz",
    # Make it owned by root so it does not have the uid of the CI robot.
    owner = "0.0",
    strip_prefix = ".",
    deps = [
        ":distro_bins.tar",
        ":distro_srcs.tar",
    ],
)