github.com/stackb/rules_proto@v0.0.0-20240221195024-5428336c51f1/rules/proto_repository_info.bzl (about) 1 load("@build_stack_rules_proto//rules:providers.bzl", "ProtoRepositoryInfo") 2 3 def _proto_repository_info(ctx): 4 return [ 5 ProtoRepositoryInfo( 6 commit = ctx.attr.commit, 7 tag = ctx.attr.tag, 8 vcs = ctx.attr.vcs, 9 urls = ctx.attr.urls, 10 sha256 = ctx.attr.sha256, 11 strip_prefix = ctx.attr.strip_prefix, 12 source_host = ctx.attr.source_host, 13 source_owner = ctx.attr.source_owner, 14 source_repo = ctx.attr.source_repo, 15 source_prefix = ctx.attr.source_prefix, 16 source_commit = ctx.attr.source_commit, 17 ), 18 ] 19 20 proto_repository_info = rule( 21 implementation = _proto_repository_info, 22 attrs = { 23 "commit": attr.string(doc = "the proto_repository.commit attr value"), 24 "tag": attr.string(doc = "the proto_repository.tag attr value"), 25 "vcs": attr.string(doc = "the proto_repository.vcs attr value"), 26 "urls": attr.string_list(doc = "the proto_repository.urls attr value"), 27 "sha256": attr.string(doc = "the proto_repository.sha256 attr value"), 28 "strip_prefix": attr.string(doc = "the proto_repository.strip_prefix attr value"), 29 "source_host": attr.string(doc = "the proto_repository.source_host attr value"), 30 "source_owner": attr.string(doc = "the proto_repository.source_owner attr value"), 31 "source_repo": attr.string(doc = "the proto_repository.source_repo attr value"), 32 "source_prefix": attr.string(doc = "the proto_repository.source_prefix attr value"), 33 "source_commit": attr.string(doc = "the proto_repository.source_commit attr value"), 34 }, 35 )