wrap around dpkg-buildpackage
This commit is contained in:
@@ -49,6 +49,7 @@ fn main() {
|
||||
.arg(arg!(--backport "This changelog is for a backport entry").required(false))
|
||||
.arg(arg!(-v --version <version> "Target version").required(false)),
|
||||
)
|
||||
.subcommand(Command::new("build").about("Build the source package"))
|
||||
.get_matches();
|
||||
|
||||
match matches.subcommand() {
|
||||
@@ -101,6 +102,13 @@ fn main() {
|
||||
.args(["debian/changelog"])
|
||||
.status();
|
||||
}
|
||||
Some(("build", _sub_matches)) => {
|
||||
let cwd = std::env::current_dir().unwrap();
|
||||
if let Err(e) = pkh::build::build_source_package(Some(&cwd)) {
|
||||
error!("{}", e);
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
_ => unreachable!("Exhausted list of subcommands and subcommand_required prevents `None`"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user