Upgrade to rules_nodejs 5.8.0 (#1150)
Fixes https://github.com/emscripten-core/emsdk/issues/1020
This commit is contained in:
Родитель
63a63e1664
Коммит
5b80c10e56
|
@ -1,11 +1,25 @@
|
|||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
|
||||
|
||||
def deps():
|
||||
excludes = native.existing_rules().keys()
|
||||
|
||||
if "build_bazel_rules_nodejs" not in excludes:
|
||||
http_archive(
|
||||
name = "build_bazel_rules_nodejs",
|
||||
sha256 = "4501158976b9da216295ac65d872b1be51e3eeb805273e68c516d2eb36ae1fbb",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.4.1/rules_nodejs-4.4.1.tar.gz"],
|
||||
)
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "bazel_skylib",
|
||||
sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d",
|
||||
urls = [
|
||||
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
|
||||
],
|
||||
)
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "rules_nodejs",
|
||||
sha256 = "08337d4fffc78f7fe648a93be12ea2fc4e8eb9795a4e6aa48595b66b34555626",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.0/rules_nodejs-core-5.8.0.tar.gz"],
|
||||
)
|
||||
maybe(
|
||||
http_archive,
|
||||
name = "build_bazel_rules_nodejs",
|
||||
sha256 = "dcc55f810142b6cf46a44d0180a5a7fb923c04a5061e2e8d8eb05ccccc60864b",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.0/rules_nodejs-5.8.0.tar.gz"],
|
||||
)
|
||||
|
|
|
@ -2,18 +2,13 @@ load(":toolchain.bzl", "emscripten_cc_toolchain_config_rule")
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
# Name depends on rules_nodejs version being used.
|
||||
# https://github.com/emscripten-core/emsdk/issues/1020
|
||||
# https://github.com/bazelbuild/rules_nodejs/issues/3375
|
||||
node_files = "@nodejs_host//:node_files" if existing_rule("@nodejs_host//:node_files") else "@nodejs//:node_files"
|
||||
|
||||
filegroup(
|
||||
name = "common_files",
|
||||
srcs = [
|
||||
"emscripten_config",
|
||||
"env.sh",
|
||||
"env.bat",
|
||||
node_files,
|
||||
"@nodejs//:node_files",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче