mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
feat(code-rs): add forked workspace and dual build support
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// Compile-time embedded version string.
|
||||
// Prefer the CODE_VERSION provided by CI; fall back to the package
|
||||
// version for local builds.
|
||||
pub const CODE_VERSION: &str = {
|
||||
match option_env!("CODE_VERSION") {
|
||||
Some(v) => v,
|
||||
None => env!("CARGO_PKG_VERSION"),
|
||||
}
|
||||
};
|
||||
|
||||
#[inline]
|
||||
pub fn version() -> &'static str {
|
||||
CODE_VERSION
|
||||
}
|
||||
Reference in New Issue
Block a user