Debian Codegraph @

build.rs

raw ◀ ▶
1 Debian patch touch this file
1 use std::{fs::File, io::Write};
•2 use std::env;
3 // Build.rs does not use all provided functions
4 #[allow(dead_code)]
5 #[path = "src/git.rs"]
6 mod git;
7
8 fn main() {
9
•10 let ver = env!("CARGO_PKG_VERSION");
11 File::create("src/gir_version.rs")
12 .and_then(|mut f| writeln!(f, "pub const VERSION: &str = \"{ver}\";",))
13 .unwrap();
14 }