mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-09 15:37:05 +03:00
16a4f0626b
changelog_begin changelog_end
30 lines
798 B
Python
30 lines
798 B
Python
# Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
def _impl(ctx):
|
|
# Generates an empty BUILD file, because we do not need to build anything.
|
|
ctx.file(
|
|
"BUILD",
|
|
content = """exports_files(["index.bzl"])""",
|
|
executable = False,
|
|
)
|
|
|
|
testing = ctx.os.environ.get("DAML_ORACLE_TESTING", default = "false") == "true"
|
|
|
|
ctx.file(
|
|
"index.bzl",
|
|
content = """
|
|
oracle_testing = {testing}
|
|
oracle_tags = ["oracle"] + ([] if oracle_testing else ["manual"])
|
|
""".format(
|
|
testing = testing,
|
|
),
|
|
executable = False,
|
|
)
|
|
|
|
oracle_configure = repository_rule(
|
|
environ = ["DAML_ORACLE_TESTING"],
|
|
implementation = _impl,
|
|
attrs = {},
|
|
)
|