deb: first implementation
This commit is contained in:
11
src/main.rs
11
src/main.rs
@@ -8,8 +8,7 @@ extern crate flate2;
|
||||
|
||||
use pkh::pull::pull;
|
||||
|
||||
mod changelog;
|
||||
use changelog::generate_entry;
|
||||
use pkh::changelog::generate_entry;
|
||||
|
||||
use indicatif_log_bridge::LogWrapper;
|
||||
use log::{error, info};
|
||||
@@ -50,6 +49,7 @@ fn main() {
|
||||
.arg(arg!(-v --version <version> "Target version").required(false)),
|
||||
)
|
||||
.subcommand(Command::new("build").about("Build the source package"))
|
||||
.subcommand(Command::new("deb").about("Build the binary package"))
|
||||
.get_matches();
|
||||
|
||||
match matches.subcommand() {
|
||||
@@ -109,6 +109,13 @@ fn main() {
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
Some(("deb", _sub_matches)) => {
|
||||
let cwd = std::env::current_dir().unwrap();
|
||||
if let Err(e) = pkh::deb::build_binary_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