mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 04:02:00 -06:00
Add (short) commit hash and build time to version hash
This commit is contained in:
parent
59b5e3d239
commit
b1182d4f7b
4 changed files with 62 additions and 13 deletions
7
build.rs
7
build.rs
|
|
@ -2,14 +2,7 @@ use clap::{Command, CommandFactory};
|
|||
use clap_complete::shells;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
// this build file generates completions for various shells as well as manual pages
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
// do not generate anything when building non release
|
||||
if cfg!(debug_assertions) {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
// note that we're using an anti-pattern here / violate the rust conventions. build script are
|
||||
// not supposed to write outside of 'OUT_DIR'. to have the generated files in the build "root"
|
||||
// (the same directory where the output binary lives) is much simpler than in 'OUT_DIR' since
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue