MCPcopy
hub / github.com/Koenkk/zigbee2mqtt / currentHash

Function currentHash

index.js:60–72  ·  view source on GitHub ↗

@type {() => Promise }

()

Source from the content-addressed store, hash-verified

58
59/** @type {() => Promise<string>} */
60async function currentHash() {
61 return await new Promise((resolve) => {
62 exec("git rev-parse --short=8 HEAD", (error, stdout) => {
63 const commitHash = stdout.trim();
64
65 if (error || commitHash === "") {
66 resolve("unknown");
67 } else {
68 resolve(commitHash);
69 }
70 });
71 });
72}
73
74/** @type {() => Promise<void>} */
75async function writeHash() {

Callers 2

writeHashFunction · 0.85
checkDistFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected