From 1159cdd1bc25f6df5313c815701f5a433c638f67 Mon Sep 17 00:00:00 2001 From: clockwork-labs-bot Date: Tue, 25 Aug 2026 16:01:50 -0400 Subject: [PATCH] Move codegen git hash out of lib --- crates/{lib => codegen}/build.rs | 0 crates/codegen/src/util.rs | 3 ++- crates/lib/src/version.rs | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) rename crates/{lib => codegen}/build.rs (100%) diff --git a/crates/lib/build.rs b/crates/codegen/build.rs similarity index 100% rename from crates/lib/build.rs rename to crates/codegen/build.rs diff --git a/crates/codegen/src/util.rs b/crates/codegen/src/util.rs index a13a7ff2aba..5a62afdd06f 100644 --- a/crates/codegen/src/util.rs +++ b/crates/codegen/src/util.rs @@ -56,6 +56,7 @@ pub(super) fn print_lines(output: &mut Indenter, lines: &[&str]) { } pub const AUTO_GENERATED_PREFIX: &str = "// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB"; +const GIT_HASH: &str = env!("GIT_HASH"); const AUTO_GENERATED_FILE_COMMENT: &[&str] = &[ "// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE", @@ -72,7 +73,7 @@ pub(super) fn print_auto_generated_version_comment(output: &mut Indenter) { output, "// This was generated using spacetimedb cli version {} (commit {}).", version::spacetimedb_lib_version(), - version::GIT_HASH + GIT_HASH ); writeln!(output); } diff --git a/crates/lib/src/version.rs b/crates/lib/src/version.rs index c0fc2454c05..ba06079aeb6 100644 --- a/crates/lib/src/version.rs +++ b/crates/lib/src/version.rs @@ -1,5 +1,4 @@ const CLI_VERSION: &str = env!("CARGO_PKG_VERSION"); -pub const GIT_HASH: &str = env!("GIT_HASH"); pub fn spacetimedb_lib_version() -> &'static str { CLI_VERSION