MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / build_hash

Function build_hash

scripts/rust.py:11–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9
10@cache
11def build_hash() -> str:
12 if environ.get("CODEBUILD_RESOLVED_SOURCE_VERSION") is not None:
13 build_hash = environ["CODEBUILD_RESOLVED_SOURCE_VERSION"]
14 else:
15 try:
16 build_hash = run_cmd_output(["git", "rev-parse", "HEAD"]).strip()
17 except Exception as e:
18 warn("Failed to get build hash:", e)
19 build_hash = "unknown"
20 info("build_hash =", build_hash)
21 return build_hash
22
23
24@cache

Callers 2

rust_envFunction · 0.85
rust.pyFile · 0.85

Calls 4

run_cmd_outputFunction · 0.90
warnFunction · 0.90
infoFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected