Show build revision and automate Warp sync workflow

This commit is contained in:
2026-08-24 13:27:09 -05:00
parent 4a364ce37f
commit a85ef61b1a
8 changed files with 344 additions and 161 deletions
+21
View File
@@ -0,0 +1,21 @@
pub(crate) const SOURCE_COMMIT: &str = env!("GALAXY_BUILD_GIT_COMMIT");
pub(crate) fn source_is_dirty() -> bool {
env!("GALAXY_BUILD_GIT_DIRTY") == "true"
}
pub(crate) fn source_revision_label() -> String {
if source_is_dirty() {
format!("{SOURCE_COMMIT} (modified)")
} else {
SOURCE_COMMIT.to_owned()
}
}
pub(crate) const fn profile() -> &'static str {
if cfg!(debug_assertions) {
"debug"
} else {
"release"
}
}