Skip to content

Commit

Permalink
Formatting fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
duckinator committed Nov 5, 2024
1 parent 0cb5667 commit e4ade7f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
7 changes: 5 additions & 2 deletions cargo-dist/src/backend/ci/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,11 @@ impl GithubCiInfo {
use std::fmt::Write;
let install_dist =
install_dist_for_targets(&targets, &install_dist_sh, &install_dist_ps1);
let install_cargo_auditable =
install_dist_for_targets(&targets, &install_cargo_auditable_sh, &install_cargo_auditable_ps1);
let install_cargo_auditable = install_dist_for_targets(
&targets,
&install_cargo_auditable_sh,
&install_cargo_auditable_ps1,
);
let mut dist_args = String::from("--artifacts=local");
for target in &targets {
write!(dist_args, " --target={target}").unwrap();
Expand Down
9 changes: 6 additions & 3 deletions cargo-dist/src/backend/ci/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const SELF_DIST_VERSION: &str = env!("CARGO_PKG_VERSION");
const BASE_DIST_FETCH_URL: &str = "https://github.com/axodotdev/cargo-dist/releases/download";

// NOTE: This is hard-coded to download latest.
const BASE_CARGO_AUDITABLE_FETCH_LATEST_URL: &str = "https://github.com/rust-secure-code/cargo-auditable/releases/download";
const BASE_CARGO_AUDITABLE_FETCH_LATEST_URL: &str =
"https://github.com/rust-secure-code/cargo-auditable/releases/download";

/// Info about all the enabled CI backends
#[derive(Debug, Default)]
Expand Down Expand Up @@ -72,12 +73,14 @@ fn install_dist_git(version: &Version) -> Option<String> {

/// Get the command to invoke to install cargo-auditable via sh script
fn install_cargo_auditable_sh_latest() -> String {
let installer_url = format!("{BASE_CARGO_AUDITABLE_FETCH_LATEST_URL}/cargo-auditable-installer.sh");
let installer_url =
format!("{BASE_CARGO_AUDITABLE_FETCH_LATEST_URL}/cargo-auditable-installer.sh");
format!("curl --proto '=https' --tlsv1.2 -LsSf {installer_url} | sh")
}

/// Get the command to invoke to install cargo-auditable via ps1 script
fn install_cargo_auditable_ps1_latest() -> String {
let installer_url = format!("{BASE_CARGO_AUDITABLE_FETCH_LATEST_URL}/cargo-auditable-installer.ps1");
let installer_url =
format!("{BASE_CARGO_AUDITABLE_FETCH_LATEST_URL}/cargo-auditable-installer.ps1");
format!(r#"powershell -c "irm {installer_url} | iex""#)
}
4 changes: 2 additions & 2 deletions cargo-dist/src/build/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ mod tests {
};
let target = CargoBuildStep {
expected_binaries: vec![],
features: features,
features,
package: CargoTargetPackages::Workspace,
profile: "release".to_string(),
rustflags: "--this-rust-flag-gets-ignored".to_string(),
Expand Down Expand Up @@ -340,7 +340,7 @@ mod tests {
};
let target = CargoBuildStep {
expected_binaries: vec![],
features: features,
features,
package: CargoTargetPackages::Workspace,
profile: "release".to_string(),
rustflags: "--this-rust-flag-gets-ignored".to_string(),
Expand Down

0 comments on commit e4ade7f

Please sign in to comment.