-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adjust build-stamp to always reflect the most recent tag * Create Debian packages --------- Co-authored-by: Florian Weikert <fwe@google.com>
- Loading branch information
1 parent
0b27498
commit 22bef8d
Showing
4 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
load("@rules_pkg//pkg:deb.bzl", "pkg_deb") | ||
load("@rules_pkg//pkg:tar.bzl", "pkg_tar") | ||
|
||
config_setting( | ||
name = "stamp_detect", | ||
values = {"stamp": "1"}, | ||
) | ||
|
||
genrule( | ||
name = "parse_version", | ||
outs = ["version.txt"], | ||
cmd_bash = select({ | ||
":stamp_detect": "sed -ne 's#^STABLE_VERSION v##p' bazel-out/stable-status.txt > $@", | ||
"//conditions:default": "echo 0.0.0 > $@", | ||
}), | ||
cmd_bat = "echo 0.0.0 >> $@", | ||
stamp = True, | ||
) | ||
|
||
ARCHES = ["amd64", "arm64"] | ||
|
||
[ | ||
pkg_tar( | ||
name = "bazelisk-{}_tar".format(arch), | ||
out = "bazelisk-{}.tar".format(arch), | ||
srcs = ["//:bazelisk-linux-{}".format(arch)], | ||
remap_paths = {"bazelisk-linux_{}".format(arch): "bazelisk"}, | ||
package_dir = "/usr/bin", | ||
stamp = -1, | ||
symlinks = {"bazel": "bazelisk"}, | ||
) | ||
for arch in ARCHES | ||
] | ||
|
||
[ | ||
pkg_deb( | ||
name = "bazelisk-{}_deb".format(arch), | ||
architecture = arch, | ||
conflicts = ["bazel"], | ||
data = ":bazelisk-{}_tar".format(arch), | ||
description_file = ":description.txt", | ||
homepage = "https://github.com/bazelbuild/bazelisk", | ||
license = "Apache-2.0", | ||
maintainer = "The Bazel Authors <bazel-dev@googlegroups.com>", | ||
out = "bazelisk-{}.deb".format(arch), | ||
package = "bazelisk", | ||
section = "contrib/devel", | ||
version_file = ":version.txt", | ||
visibility = ["//visibility:public"], | ||
) | ||
for arch in ARCHES | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
A user-friendly launcher for Bazel | ||
Bazelisk is a wrapper for Bazel written in Go. It automatically picks a good | ||
version of Bazel given your current working directory, downloads it from the | ||
official server (if required) and then transparently passes through all | ||
command-line arguments to the real Bazel binary. You can call it just like you | ||
would call Bazel. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters