mirror of https://github.com/bazelbuild/platforms
Merge pull request #57 from aiuto/lic
Add rules_license style declaration.
This commit is contained in:
commit
829cd4bc1a
20
BUILD
20
BUILD
|
@ -1,8 +1,22 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
load("@rules_license//rules:license.bzl", "license")
|
||||
|
||||
licenses(["notice"])
|
||||
package(
|
||||
default_applicable_licenses = [":license"],
|
||||
default_visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
exports_files(["LICENSE"])
|
||||
license(
|
||||
name = "license",
|
||||
license_kinds = [
|
||||
"@rules_license//licenses/spdx:Apache-2.0",
|
||||
],
|
||||
license_text = "LICENSE",
|
||||
)
|
||||
|
||||
exports_files([
|
||||
"LICENSE",
|
||||
"MODULE.bazel",
|
||||
])
|
||||
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
module(
|
||||
name = "platforms",
|
||||
version = "0.0.6", # keep in sync with version.bzl
|
||||
version = "0.0.7", # keep in sync with version.bzl
|
||||
compatibility_level = 1,
|
||||
)
|
||||
|
||||
bazel_dep(name = "rules_license", version = "0.0.4")
|
||||
|
|
11
WORKSPACE
11
WORKSPACE
|
@ -1 +1,12 @@
|
|||
workspace(name = "platforms")
|
||||
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
http_archive(
|
||||
name = "rules_license",
|
||||
urls = [
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/rules_license/releases/download/0.0.4/rules_license-0.0.4.tar.gz",
|
||||
"https://github.com/bazelbuild/rules_license/releases/download/0.0.4/rules_license-0.0.4.tar.gz",
|
||||
],
|
||||
sha256 = "6157e1e68378532d0241ecd15d3c45f6e5cfd98fc10846045509fb2a7cc9e381",
|
||||
)
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
# Include dependencies which are only needed for development here.
|
||||
#
|
||||
# Even if this is empty, you need it with bzlmod enable to prevent
|
||||
# bzlmod from bringing in WORKSPACE too.
|
|
@ -0,0 +1,21 @@
|
|||
load("//:version.bzl", "version")
|
||||
|
||||
package(default_visibility = ["//visibility:private"])
|
||||
|
||||
# This is a quick hack to make sure that version.bzl agrees with MODULE.bazel
|
||||
# It only works from Linux, but that is sufficient, becuase we do a presubmit
|
||||
# run linux, so we will still catch a mismatch.
|
||||
genrule(
|
||||
name = "versions_match",
|
||||
outs = ["found_it"],
|
||||
cmd = ";\n".join([
|
||||
"""echo version: %s""" % version,
|
||||
"""grep 'version = "%s",' $(location //:MODULE.bazel) >$(location :found_it)""" % version,
|
||||
]),
|
||||
target_compatible_with = [
|
||||
"//os:linux",
|
||||
],
|
||||
tools = [
|
||||
"//:MODULE.bazel",
|
||||
],
|
||||
)
|
|
@ -13,4 +13,4 @@
|
|||
# limitations under the License.
|
||||
"""The version of bazelbuild/platforms."""
|
||||
|
||||
version = "0.0.6"
|
||||
version = "0.0.7"
|
||||
|
|
Loading…
Reference in New Issue