MCPcopy Create free account
hub / github.com/Qovery/engine / load_deployed_engine_version

Function load_deployed_engine_version

app/src/utils.rs:107–117  ·  view source on GitHub ↗

Returns the deployed engine version from `ENGINE_TAG_VERSION` when it is set to a non-empty value, otherwise falls back to the build-time version embedded in the binary, then to the shadow-rs commit ID when the embedded version is absent or invalid.

(
    build_version_fallback: &str,
    shadow_commit_fallback: &str,
)

Source from the content-addressed store, hash-verified

105/// value, otherwise falls back to the build-time version embedded in the binary, then to the
106/// shadow-rs commit ID when the embedded version is absent or invalid.
107pub fn load_deployed_engine_version(
108 build_version_fallback: &str,
109 shadow_commit_fallback: &str,
110) -> DeployedEngineVersion {
111 let runtime_engine_version = env::var("ENGINE_TAG_VERSION").ok();
112 parse_deployed_engine_version(
113 runtime_engine_version.as_deref(),
114 build_version_fallback,
115 shadow_commit_fallback,
116 )
117}
118
119#[cfg(test)]
120mod tests {

Callers 2

mainFunction · 0.70
mainFunction · 0.70

Calls 2

varFunction · 0.85

Tested by

no test coverage detected