Add (short) commit hash and build time to version hash

This commit is contained in:
bytedream 2022-11-28 11:54:04 +01:00
parent 59b5e3d239
commit b1182d4f7b
4 changed files with 62 additions and 13 deletions

View file

@ -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