12
src/deb.rs
12
src/deb.rs
@@ -2,7 +2,11 @@ use std::error::Error;
|
||||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
|
||||
pub fn build_binary_package(arch: Option<&str>, series: Option<&str>, cwd: Option<&Path>) -> Result<(), Box<dyn Error>> {
|
||||
pub fn build_binary_package(
|
||||
arch: Option<&str>,
|
||||
series: Option<&str>,
|
||||
cwd: Option<&Path>,
|
||||
) -> Result<(), Box<dyn Error>> {
|
||||
let cwd = cwd.unwrap_or_else(|| Path::new("."));
|
||||
|
||||
// Parse changelog to get package name and version
|
||||
@@ -26,10 +30,8 @@ pub fn build_binary_package(arch: Option<&str>, series: Option<&str>, cwd: Optio
|
||||
if let Some(series) = series {
|
||||
status.arg(format!("--dist={}", series));
|
||||
}
|
||||
|
||||
let status = status
|
||||
.arg(dsc_path)
|
||||
.status()?;
|
||||
|
||||
let status = status.arg(dsc_path).status()?;
|
||||
|
||||
if !status.success() {
|
||||
return Err(format!("sbuild failed with status: {}", status).into());
|
||||
|
||||
Reference in New Issue
Block a user