We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b7d535 commit fe26e5eCopy full SHA for fe26e5e
1 file changed
web/flat-web/scripts/vite-plugin-html-hash.ts
@@ -23,9 +23,13 @@ export function injectHtmlHash(): Plugin {
23
// so using the function
24
const gitHash = (): string => {
25
try {
26
- return execSync("git rev-parse HEAD", {
+ const hash = execSync("git rev-parse HEAD", {
27
encoding: "utf-8",
28
}).trim();
29
+ const time = execSync(`git show ${hash} --pretty=%cI --no-patch --no-notes`, {
30
+ encoding: "utf-8",
31
+ }).trim();
32
+ return [hash, time].join(" ");
33
} catch {
34
return "NOT_A_GIT_REPO";
35
}
0 commit comments