Skip to content

Commit

Permalink
Add script to update build date
Browse files Browse the repository at this point in the history
  • Loading branch information
squix78 committed Jun 23, 2024
1 parent dfce3f1 commit eb5609c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions buildDate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"year": "2024-06-23T17:48:55.283Z"
}
10 changes: 10 additions & 0 deletions createBuildDate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const { writeFileSync } = require('fs')
const { join } = require('path')

const TIME_STAMP_PATH = join(__dirname, 'dist/esp-app-market/buildDate.json');

const createBuildDate = {
year: new Date()
}

writeFileSync(TIME_STAMP_PATH, JSON.stringify(createBuildDate, null, 2));
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"build": "ng build",
"build": "node createBuildDate.js && ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
Expand Down

0 comments on commit eb5609c

Please sign in to comment.