diff --git a/.gitignore b/.gitignore index ac51a05..0d4fed2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ bazel-* +MODULE.bazel.lock diff --git a/MODULE.bazel b/MODULE.bazel new file mode 100644 index 0000000..d88f7eb --- /dev/null +++ b/MODULE.bazel @@ -0,0 +1,11 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + +module( + name = "lowrisc_bazel_release", + version = "0.1.0", +) + +tools = use_extension("//:extensions.bzl", "tools") +use_repo(tools, "com_github_gh") diff --git a/README.md b/README.md index 3dbac51..7b8cdd6 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,16 @@ load("@lowrisc_bazel_release//:deps.bzl", "lowrisc_bazel_release_deps") lowrisc_bazel_release_deps() ``` +Or your `MODULE.bazel`: + +``` +bazel_dep(name = "lowrisc_bazel_release", version = "0.1.0") +git_override( + module_name = "lowrisc_bazel_release", + remote = "https://github.com/lowRISC/bazel-release", +) +``` + ### Defining the Release In a `BUILD` file, instantiate the `release` rule and provide the diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod new file mode 100644 index 0000000..487115a --- /dev/null +++ b/WORKSPACE.bzlmod @@ -0,0 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + +# This file overrides `WORKSPACE.bazel` when bzlmod is active and is +# left intentionally empty. diff --git a/extensions.bzl b/extensions.bzl new file mode 100644 index 0000000..ca14a63 --- /dev/null +++ b/extensions.bzl @@ -0,0 +1,9 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + +load("//third_party/github:repos.bzl", "github_tools_repos") + +tools = module_extension( + implementation = lambda ctx: github_tools_repos(), +)