mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 17:28:46 +03:00
ad9325275a
* language: put sdk versions into package.json The typescript library versions of our support libraries are now given by the sdk version. CHANGELOG_BEGIN CHANGELOG_END * removed local field * better placeholders * consistent SDK_VERSION * sed sdkversion in test script
28 lines
702 B
Python
28 lines
702 B
Python
# Copyright (c) 2020 The DAML Authors. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
_sdk_version_bzl_template = """
|
|
sdk_version = "{SDK_VERSION}"
|
|
"""
|
|
|
|
def _sdk_version_impl(repository_ctx):
|
|
version = repository_ctx.read(repository_ctx.attr.version).strip()
|
|
sdk_version_substitutions = {
|
|
"SDK_VERSION": version,
|
|
}
|
|
repository_ctx.file(
|
|
"sdk_version.bzl",
|
|
_sdk_version_bzl_template.format(**sdk_version_substitutions),
|
|
False,
|
|
)
|
|
repository_ctx.file(
|
|
"BUILD",
|
|
"",
|
|
False,
|
|
)
|
|
|
|
sdk_version = repository_rule(
|
|
implementation = _sdk_version_impl,
|
|
attrs = {"version": attr.label(default = "//:VERSION")},
|
|
)
|