-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBUILD.bazel
44 lines (39 loc) · 1.09 KB
/
BUILD.bazel
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
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/bazelisk:lipo",
"//toolchains/git-town:lipo",
"//toolchains/ibazel:lipo",
"//toolchains/nomad:lipo",
"//toolchains/terraform: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",
tars = [":binaries"],
version = VERSION,
)
copy_file(
name = "dist_pkg",
src = ":pkg",
out = ".distrib/chickenandbazel.pkg",
allow_symlink = True,
is_executable = False,
)