forked from pact-foundation/pact-reference
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add toolchain pact_verifier_cli
- Loading branch information
Showing
7 changed files
with
70 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
load("@crate_index//:defs.bzl", "crate_repositories") | ||
|
||
def create_crate_repositories(): | ||
crate_repositories() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") | ||
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") | ||
load("@bazel_tools//tools/build_defs/repo:git.bzl","git_repository") | ||
|
||
def repos(): | ||
maybe( | ||
http_archive, | ||
name = "rules_rust", | ||
sha256 = "d125fb75432dc3b20e9b5a19347b45ec607fabe75f98c6c4ba9badaab9c193ce", | ||
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.17.0/rules_rust-v0.17.0.tar.gz"], | ||
sha256 = "4a9cb4fda6ccd5b5ec393b2e944822a62e050c7c06f1ea41607f14c4fdec57a2", | ||
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.25.1/rules_rust-v0.25.1.tar.gz"], | ||
) | ||
|
||
maybe( | ||
git_repository, | ||
name = "source", | ||
remote = "https://github.com/opicaud/pact-reference", | ||
commit = "34d1638af6f00d7fac449c71dce02aad3b9d6828", | ||
shallow_since = "1688765558 +0200", | ||
branch = "master", | ||
strip_prefix = "rust", | ||
) | ||
|
||
maybe( | ||
http_file, | ||
name = "pact_verifier_cli_archive", | ||
sha256 = "57c8ae7c95f46e4a48d3d6a251853dd5dd58917e866266ced665fc48a3fdecdd", | ||
urls = ["https://github.com/pact-foundation/pact-reference/releases/download/pact_verifier_cli-v1.0.1/pact_verifier_cli-linux-x86_64.gz"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"""pact_reference toolchain implementation""" | ||
|
||
def _pact_reference_toolchain_impl(ctx): | ||
return platform_common.ToolchainInfo( | ||
pact_verifier_cli = ctx.file.pact_verifier_cli, | ||
) | ||
|
||
pact_reference_toolchain = rule( | ||
implementation = _pact_reference_toolchain_impl, | ||
doc = "A pact reference toolchain", | ||
attrs = { | ||
"pact_verifier_cli": attr.label( | ||
doc = "A pact reference binary", | ||
allow_single_file = True, | ||
mandatory = True, | ||
), | ||
}, | ||
) |