-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBUILD.bazel
More file actions
64 lines (57 loc) · 1.56 KB
/
BUILD.bazel
File metadata and controls
64 lines (57 loc) · 1.56 KB
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
55
56
57
58
59
60
61
62
63
64
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
load("@//lib:pkgbuild.bzl", "pkgbuild_tars")
# The resulting PKG should be installable by:
#
# sudo installer -pkg bazel-out/darwin-fastbuild/bin/chickenandbazel.pkg -target /
VERSION = "1.7.5"
# Test this payload with:
# bazel build //:chickenandbazel && tar tzf bazel-bin/chickenandbazel.tar
pkg_tar(
name = "binaries",
srcs = [
"//scripts:check-installs.sh",
"//toolchains/age:lipo",
"//toolchains/age-keygen:lipo",
"//toolchains/bazelisk:lipo",
"//toolchains/git-lfs:lipo",
"//toolchains/git-town:lipo",
"//toolchains/ibazel:lipo",
"//toolchains/nomad:lipo",
"//toolchains/sops:lipo",
"//toolchains/talosctl:lipo",
"//toolchains/terraform:lipo",
"//toolchains/terragrunt:lipo",
],
mode = "0755",
package_dir = "/usr/local/bin",
symlinks = {
"usr/local/bin/bazel": "bazelisk",
},
)
pkgbuild_tars(
name = "pkg",
package_name = "chickenandbazel.pkg",
identifier = "nu.old.chickenandbazel",
tags = [ "no-cache" ],
tars = [":binaries"],
version = VERSION,
)
copy_file(
name = "dist_pkg",
src = ":pkg",
out = ".distrib/chickenandbazel.pkg",
allow_symlink = True,
is_executable = False,
)
alias(
name = "multitool",
actual = "//toolchains/multitool",
)
genrule(
name = "sudoinstall",
cmd = "echo 'sudo installer -target / -pkg $<' > $@",
executable = True,
srcs = [ ":pkg" ],
outs = [ "install.bash" ],
)