INNER CODE UNIT · Rust
is_development_version
ogham/dog · build.rs:36
else if is_development_version() {
format!("{}\nv{} [{}] built on {} \\1;31m(pre-release!)\\0m\n\\1;4;34m{}\\0m", tagline, version_string(), git_hash(), build_date(), url)
}
else {
format!("{}\nv{}\n\\1;4;34m{}\\0m", tagline, version_string(), url)
};
// We need to create these files in the Cargo output directory.
let out = PathBuf::from(env::var("OUT_DIR").unwrap());
// Pretty version text
let mut f = File::create(&out.join("version.pretty.txt"))?;
writeln!(f, "{}", convert_codes(&ver))?;
// Bland version text
let mut f = File::create(&out.join("version.bland.txt"))?;
writeln!(f, "{}", strip_codes(&ver))?;