init
This commit is contained in:
commit
e176b1c094
17 changed files with 632 additions and 0 deletions
13
cli/git-commit-build.ts
Normal file
13
cli/git-commit-build.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
async function getGitCommitHash(): Promise<string> {
|
||||
try {
|
||||
const proc = Bun.spawn(["git", "rev-parse", "--short", "HEAD"]);
|
||||
const text = await new Response(proc.stdout).text();
|
||||
return text.trim();
|
||||
} catch {
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
Bun.file("version").write(await getGitCommitHash());
|
||||
|
||||
export {};
|
||||
Loading…
Add table
Add a link
Reference in a new issue