Skip to content

Commit

Permalink
chore: Install cargo-deb and cargo-generate-rpm as packaging dependen…
Browse files Browse the repository at this point in the history
…cies
  • Loading branch information
LeChatP committed Sep 12, 2024
1 parent 1f513eb commit b08937c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 6 additions & 1 deletion xtask/src/deploy/debian.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ use crate::{
use super::setup_maint_scripts;

fn dependencies(os: &OsTarget, priv_bin: Option<String>) -> Result<ExitStatus, anyhow::Error> {
install_dependencies(os, &["upx"], priv_bin).context("failed to install packaging dependencies")
install_dependencies(os, &["upx"], priv_bin).context("failed to install packaging dependencies")?;
Command::new("cargo")
.arg("install")
.arg("cargo-deb")
.status()
.context("failed to install cargo-deb")
}

pub fn make_deb(
Expand Down
9 changes: 9 additions & 0 deletions xtask/src/deploy/redhat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@ use crate::{
util::{detect_priv_bin, get_os, OsTarget},
};

fn install_dependencies() -> Result<(), anyhow::Error> {
Command::new("cargo")
.arg("install")
.arg("cargo-generate-rpm")
.status()?;
Ok(())
}

pub fn make_rpm(
os: Option<OsTarget>,
profile: Profile,
exe: &Option<String>,
) -> Result<(), anyhow::Error> {
install_dependencies()?;
let os = get_os(os)?;
let exe: Option<String> = exe.clone().or(detect_priv_bin());

Expand Down

0 comments on commit b08937c

Please sign in to comment.