Skip to content

Commit

Permalink
better output
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett committed Sep 21, 2018
1 parent 3db8ef3 commit 6971a1b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/armake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ pub fn build(p: &project::Project) -> Result<()> {
}

pub fn release(p: &project::Project) -> Result<()> {
build(&p);
let version = project::get_version();
println!("Version: {}", version);
println!("Building Release Version: {}", version);
build(&p);
if !Path::new("releases").exists() {
fs::create_dir("releases")?;
}
Expand Down Expand Up @@ -210,7 +210,6 @@ pub fn release(p: &project::Project) -> Result<()> {
if !path.ends_with(".pbo") && !cpath.contains(p.prefix.as_str()) {
continue;
}
println!("{}", cpath);
fs::copy(&cpath, format!("releases/{}/@{}/{}", version, p.prefix, cpath));
let output = Command::new("tools/armake")
.arg("sign")
Expand All @@ -219,6 +218,11 @@ pub fn release(p: &project::Project) -> Result<()> {
.arg(format!("keys/{}.biprivatekey", p.prefix))
.arg(format!("releases/{}/@{}/{}", version, p.prefix, cpath))
.output()?;
if output.status.success() {
println!(" {} {}", "Signed".green(), cpath.green());
} else {
println!(" {} {}", "Not Signed".red(), cpath.red());
}
}
Ok(())
}

0 comments on commit 6971a1b

Please sign in to comment.