2020-12-10 11:27:21 +01:00
|
|
|
load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
|
2021-05-04 12:06:42 +02:00
|
|
|
load("@rules_rust//rust:defs.bzl", "rust_analyzer")
|
2020-12-10 11:27:21 +01:00
|
|
|
|
2020-11-04 05:02:08 +01:00
|
|
|
config_setting(
|
|
|
|
name = "release",
|
|
|
|
values = {
|
|
|
|
"compilation_mode": "opt",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
2020-11-01 05:26:58 +01:00
|
|
|
genrule(
|
2020-11-04 05:02:08 +01:00
|
|
|
name = "buildinfo",
|
|
|
|
srcs = ["//:defs.bzl"],
|
2020-11-01 05:26:58 +01:00
|
|
|
outs = ["buildinfo.txt"],
|
2020-11-04 05:02:08 +01:00
|
|
|
cmd = select({
|
|
|
|
"release": "$(location //scripts:buildinfo) $(location //:defs.bzl) bazel-out/stable-status.txt release > $@",
|
|
|
|
"//conditions:default": "$(location //scripts:buildinfo) $(location //:defs.bzl) bazel-out/stable-status.txt devel > $@",
|
|
|
|
}),
|
2020-11-01 05:26:58 +01:00
|
|
|
stamp = 1,
|
2020-11-04 05:02:08 +01:00
|
|
|
tools = [
|
|
|
|
"//scripts:buildinfo",
|
|
|
|
],
|
2020-11-01 05:26:58 +01:00
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
alias(
|
|
|
|
name = "tsconfig.json",
|
|
|
|
actual = "//ts:tsconfig.json",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
2020-11-04 05:02:08 +01:00
|
|
|
|
2020-12-10 11:27:21 +01:00
|
|
|
pkg_tar(
|
|
|
|
name = "dist",
|
|
|
|
srcs = [
|
|
|
|
"//pylib/anki:wheel",
|
|
|
|
"//qt/aqt:wheel",
|
|
|
|
],
|
|
|
|
mode = "0644",
|
|
|
|
package_dir = "bazel-dist",
|
|
|
|
tags = ["manual"],
|
|
|
|
)
|
|
|
|
|
2021-05-04 12:06:42 +02:00
|
|
|
rust_analyzer(
|
|
|
|
name = "rust_analyzer",
|
|
|
|
targets = ["//rslib:anki"],
|
|
|
|
)
|
|
|
|
|
2020-11-04 05:02:08 +01:00
|
|
|
# for version info
|
|
|
|
exports_files(["defs.bzl"])
|