mirror of
https://github.com/pseXperiments/freedit.git
synced 2026-01-10 08:08:03 -05:00
* 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
14 lines
385 B
Rust
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}");
|
|
}
|