This repository was archived by the owner on Jun 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +38
-12
lines changed Expand file tree Collapse file tree 6 files changed +38
-12
lines changed Original file line number Diff line number Diff line change 26
26
cache : " npm"
27
27
- run : npm ci
28
28
- run : |
29
- ./bin/ update-build-info.sh
29
+ npm run update-build-info
30
30
./bin/build-mac-x64.sh
31
31
- uses : actions/upload-artifact@v4
32
32
with :
44
44
cache : " npm"
45
45
- run : npm ci
46
46
- run : |
47
- ./bin/ update-build-info.sh
47
+ npm run update-build-info
48
48
./bin/build-mac-arm64.sh
49
49
- uses : actions/upload-artifact@v4
50
50
with :
62
62
cache : " npm"
63
63
- run : npm ci
64
64
- run : |
65
- ./bin/ update-build-info.sh
65
+ npm run update-build-info
66
66
./bin/build-linux-x64.sh
67
67
- uses : actions/upload-artifact@v4
68
68
with :
84
84
cache : " npm"
85
85
- run : npm ci
86
86
- run : |
87
- ./bin/ update-build-info.sh
87
+ npm run update-build-info
88
88
./bin/build-server.sh
89
89
- uses : actions/upload-artifact@v4
90
90
with :
@@ -109,7 +109,7 @@ jobs:
109
109
cache : " npm"
110
110
- run : npm ci
111
111
- run : |
112
- ./bin/ update-build-info.sh
112
+ npm run update-build-info
113
113
./bin/build-win-x64.sh DONTPACK
114
114
- uses : actions/upload-artifact@v4
115
115
with :
@@ -128,7 +128,7 @@ jobs:
128
128
- run : npm ci
129
129
- name : Run installer build
130
130
run : |
131
- ./bin/ update-build-info.sh
131
+ npm run update-build-info
132
132
npm run make-electron
133
133
- name : Publish installer artifact
134
134
uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ mv package.json.tmp package.json
32
32
33
33
git add package.json
34
34
35
- ./ update-build-info.sh
35
+ npm run update-build-info
36
36
37
37
git add src/services/build.ts
38
38
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import child_process from "child_process" ;
2
+ import fs from "fs" ;
3
+
4
+ function getBuildDate ( ) {
5
+ const now = new Date ( ) ;
6
+ now . setMilliseconds ( 0 ) ;
7
+ return now
8
+ . toISOString ( )
9
+ . replace ( ".000" , "" ) ;
10
+ }
11
+
12
+ function getGitRevision ( ) {
13
+ return child_process . execSync ( 'git log -1 --format="%H"' )
14
+ . toString ( "utf-8" )
15
+ . trimEnd ( ) ;
16
+ }
17
+
18
+ const output = `\
19
+ export = {
20
+ buildDate: "${ getBuildDate ( ) } ",
21
+ buildRevision: "${ getGitRevision ( ) } "
22
+ };
23
+ ` ;
24
+
25
+ fs . writeFileSync ( "src/services/build.ts" , output ) ;
Original file line number Diff line number Diff line change 40
40
"start-electron-forge" : " npm run prepare-dist && electron-forge start" ,
41
41
"make-electron" : " npm run webpack && npm run prepare-dist && electron-forge make" ,
42
42
"package-electron" : " electron-forge package" ,
43
- "prepare-dist" : " rimraf ./dist && tsc && ts-node ./bin/copy-dist.ts"
43
+ "prepare-dist" : " rimraf ./dist && tsc && ts-node ./bin/copy-dist.ts" ,
44
+ "update-build-info" : " ts-node bin/update-build-info.ts"
44
45
},
45
46
"dependencies" : {
46
47
"@braintree/sanitize-url" : " ^7.1.0" ,
Original file line number Diff line number Diff line change 1
- export = { buildDate :"2024-07-14T22:32:45+03:00" , buildRevision : "b811f3d399aed7e740bd8e92ef7edc7d15de7038" } ;
1
+ export = {
2
+ buildDate : "2024-07-21T08:44:01Z" ,
3
+ buildRevision : "374a51b77c35f5ff2e619b49f1e7aeda16005945"
4
+ } ;
You can’t perform that action at this time.
0 commit comments