File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 - name : Test
2323 run : dotnet run devopstests
2424
25+ - name : Set app version
26+ run : export APP_VERSION=${{ github.ref_name }}
27+
2528 - name : Build
2629 run : dotnet run bundle
2730
Original file line number Diff line number Diff line change 1414 var global = global || window ;
1515 </ script >
1616 < 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+
1721</ body >
1822</ html >
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import react from "@vitejs/plugin-react";
33
44const proxyPort = process . env . SERVER_PROXY_PORT || "5000" ;
55const proxyTarget = "http://localhost:" + proxyPort ;
6+ const appVersion = process . env . APP_VERSION || "dev"
67
78// https://vitejs.dev/config/
89export default defineConfig ( {
@@ -19,5 +20,8 @@ export default defineConfig({
1920 changeOrigin : true ,
2021 }
2122 }
23+ } ,
24+ define : {
25+ APP_VERSION : JSON . stringify ( appVersion ) ,
2226 }
2327} ) ;
You can’t perform that action at this time.
0 commit comments