Skip to content

Commit 20694f9

Browse files
Update version.json build
1 parent 0a3d2a4 commit 20694f9

2 files changed

Lines changed: 2 additions & 21 deletions

File tree

dist/version.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
{
2-
"version": "0.0.1",
3-
"commit": "36d2c2a",
4-
"timestamp": 1752954060802,
5-
"buildDate": "2025-07-19T19:41:00.802Z",
6-
"buildId": "0.0.1-36d2c2a-1752954060803",
7-
"cacheBuster": "v=0.0.1&t=1752954060803"
2+
"timestamp": 1752954969663
83
}

vite.config.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,8 @@ function generateVersionPlugin() {
99
name: 'generate-version',
1010
closeBundle() {
1111
// Generate version information
12-
const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'));
13-
let commit = null;
14-
15-
try {
16-
commit = execSync('git rev-parse --short HEAD', { encoding: 'utf8' }).trim();
17-
} catch (error) {
18-
console.warn('Could not get git commit hash');
19-
}
20-
2112
const versionInfo = {
22-
version: packageJson.version,
23-
commit,
24-
timestamp: Date.now(),
25-
buildDate: new Date().toISOString(),
26-
buildId: `${packageJson.version}-${commit || 'unknown'}-${Date.now()}`,
27-
cacheBuster: `v=${packageJson.version}&t=${Date.now()}`
13+
timestamp: Date.now()
2814
};
2915

3016
// Write version.json to dist

0 commit comments

Comments
 (0)