Skip to content

Commit

Permalink
chore: manually add rules_buf 0.2.0 (#1173)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle authored Dec 4, 2023
1 parent 70dfc4d commit 7069e3d
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 1 deletion.
51 changes: 51 additions & 0 deletions modules/rules_buf/0.2.0/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright 2021-2023 Buf Technologies, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"Bazel module definition for bzlmod"

module(
name = "rules_buf",
version = "0.2.0",
compatibility_level = 1,
)

bazel_dep(name = "platforms", version = "0.0.4")

# Only needed because rules_proto doesn't provide the protoc toolchain yet.
# TODO: remove in the future
bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
bazel_dep(name = "rules_go", version = "0.42.0", repo_name = "io_bazel_rules_go")
bazel_dep(name = "bazel_skylib", version = "1.5.0")

# We depend on gazelle at runtime to generate our proto_library rules
bazel_dep(name = "gazelle", version = "0.34.0", repo_name = "bazel_gazelle")

go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
go_deps,
"com_github_bazelbuild_buildtools",
"com_github_stretchr_testify",
"in_gopkg_yaml_v3",
)

# ... and then reach inside to get the gazelle binary from this repository
non_module_deps = use_extension("@bazel_gazelle//internal/bzlmod:non_module_deps.bzl", "non_module_deps")
use_repo(non_module_deps, "bazel_gazelle_go_repository_tools")

ext = use_extension("//buf:extensions.bzl", "buf")
use_repo(ext, "rules_buf_toolchains")

register_toolchains("@rules_buf_toolchains//:all")
10 changes: 10 additions & 0 deletions modules/rules_buf/0.2.0/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
bcr_test_module:
module_path: 'examples/bzlmod'
matrix:
platform: ['ubuntu2004']
tasks:
run_tests:
name: 'Run test module'
platform: ${{ platform }}
build_targets:
- '//...'
5 changes: 5 additions & 0 deletions modules/rules_buf/0.2.0/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"integrity": "sha256-vCSI7kl8P78u/uGc4h3O7YkxCgi1qTZswTPdDrIRhJg=",
"strip_prefix": "rules_buf-0.2.0",
"url": "https://github.com/bufbuild/rules_buf/archive/refs/tags/v0.2.0.zip"
}
3 changes: 2 additions & 1 deletion modules/rules_buf/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"github:bufbuild/rules_buf"
],
"versions": [
"0.1.1"
"0.1.1",
"0.2.0"
],
"yanked_versions": {}
}

0 comments on commit 7069e3d

Please sign in to comment.