-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crev-to-vet converter that converts a proof db into audits.toml
- Loading branch information
Showing
7 changed files
with
513 additions
and
20 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ members = [ | |
"crev-data", | ||
"crev-wot", | ||
"crev-lib", | ||
"crevette", | ||
] | ||
|
||
[workspace.package] | ||
|
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,19 @@ | ||
[package] | ||
name = "crevette" | ||
description = "Converter for using cargo-crev reviews with cargo-vet" | ||
keywords = ["cargo-vet", "crev2vet", "cargo-crev", "exporter", "supply-chain-security"] | ||
categories = ["development-tools"] | ||
authors.workspace = true | ||
edition.workspace = true | ||
license.workspace = true | ||
repository.workspace = true | ||
rust-version.workspace = true | ||
version.workspace = true | ||
|
||
[dependencies] | ||
crev-lib.workspace = true | ||
crev-data.workspace = true | ||
crev-wot.workspace = true | ||
semver.workspace = true | ||
serde.workspace = true | ||
toml_edit = { version = "0.19.14", features = ["serde"] } |
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,26 @@ | ||
use crevette::Crevette; | ||
use std::error::Error as _; | ||
use std::process::ExitCode; | ||
|
||
fn main() -> ExitCode { | ||
match Crevette::new().and_then(|c| c.convert_into_repo()) { | ||
Ok(res) => { | ||
println!( | ||
"Wrote '{}'\nRun `cargo crev publish` to upload the file to {}\nThen run `cargo vet import yourname {}`\n", | ||
res.local_path.display(), | ||
res.repo_git_url.as_deref().unwrap_or("your git repo (not configured yet?)"), | ||
res.repo_https_url.as_deref().unwrap_or("https://<your repo URL>/audits.toml"), | ||
); | ||
ExitCode::SUCCESS | ||
} | ||
Err(e) => { | ||
eprintln!("error: {e}"); | ||
let mut source = e.source(); | ||
while let Some(e) = source { | ||
eprintln!(" {e}"); | ||
source = e.source(); | ||
} | ||
ExitCode::FAILURE | ||
} | ||
} | ||
} |
Oops, something went wrong.