File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 22
22
- name : Test
23
23
run : dotnet run devopstests
24
24
25
+ - name : Set app version
26
+ run : export APP_VERSION=${{ github.ref_name }}
27
+
25
28
- name : Build
26
29
run : dotnet run bundle
27
30
Original file line number Diff line number Diff line change 14
14
var global = global || window ;
15
15
</ script >
16
16
< script type ="module " src ="/output/App.js "> </ script >
17
+ < script type ="module ">
18
+ document . title = document . title . concat ( ` - v${ window . APP_VERSION } ` )
19
+ </ script >
20
+
17
21
</ body >
18
22
</ html >
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import react from "@vitejs/plugin-react";
3
3
4
4
const proxyPort = process . env . SERVER_PROXY_PORT || "5000" ;
5
5
const proxyTarget = "http://localhost:" + proxyPort ;
6
+ const appVersion = process . env . APP_VERSION || "dev"
6
7
7
8
// https://vitejs.dev/config/
8
9
export default defineConfig ( {
@@ -19,5 +20,8 @@ export default defineConfig({
19
20
changeOrigin : true ,
20
21
}
21
22
}
23
+ } ,
24
+ define : {
25
+ APP_VERSION : JSON . stringify ( appVersion ) ,
22
26
}
23
27
} ) ;
You can’t perform that action at this time.
0 commit comments