mirror of https://github.com/VERT-sh/VERT.git
fix: footer commit hash coolify fix
This commit is contained in:
parent
6ac287e434
commit
4ee188cb72
|
|
@ -5,11 +5,16 @@ import svg from "@poppanator/sveltekit-svg";
|
|||
import wasm from "vite-plugin-wasm";
|
||||
import { execSync } from "child_process";
|
||||
|
||||
let commitHash = "unknown";
|
||||
try {
|
||||
commitHash = execSync("git rev-parse --short HEAD").toString().trim();
|
||||
} catch (e) {
|
||||
console.warn("Could not determine Git commit hash:", e);
|
||||
// coollify removes the .git folder but exposes commit via SOURCE_COMMIT env variable
|
||||
let commitHash = process.env.SOURCE_COMMIT || "unknown";
|
||||
|
||||
if (commitHash === "unknown") {
|
||||
try {
|
||||
commitHash = execSync("git rev-parse --short HEAD").toString().trim();
|
||||
} catch (e) {
|
||||
console.warn(`Could not determine Git commit hash: ${e}`);
|
||||
commitHash = "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
export default defineConfig(({ command }) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue