Files
freedit/apps/server/build.rs
sripwoud 479e295499 chore: scaffold monorepo (#4)
* chore: move rs code into `apps/server`

* chore: scaffold vite/react app

* feat: render raw html served by rust server in react app

* chore: use `just` as tasks runner

* doc: add main README

* fix `dev-client` just script

* refactor: write default config dirs relatively to exec bin
2024-12-13 15:16:52 -07:00

14 lines
385 B
Rust

use std::process::Command;
fn main() {
let mut git_commit = match Command::new("git").args(["rev-parse", "HEAD"]).output() {
Ok(output) if !output.stdout.is_empty() => {
String::from_utf8_lossy(&output.stdout).to_string()
}
_ => "not found".into(),
};
git_commit.truncate(7);
println!("cargo:rustc-env=GIT_COMMIT={git_commit}");
}