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