File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 2020 - name : Build Frontend
2121 working-directory : ./web
2222 run : npm i -g yarn && yarn && yarn build
23+ env :
24+ FRONTEND_VERSION : ' ${{ github.ref_name }}'
2325
2426 - name : Collect Artifacts
2527 run : tar -czf frontend.tar.gz ./web/dist/* ./web/static/index.html
Original file line number Diff line number Diff line change @@ -75,13 +75,17 @@ function ComponentVersions() {
7575 < h2 > Component Versions</ h2 >
7676 < table > < tbody >
7777 < tr >
78- < td > < b > MPD Version:</ b > </ td >
79- < td > { vResult ( mpdVersion , d => d . version ) } </ td >
78+ < td > < b > Frontend Version:</ b > </ td >
79+ < td > { __VERSION__ } </ td >
8080 </ tr >
8181 < tr >
8282 < td > < b > Proxy Version:</ b > </ td >
8383 < td > { vResult ( proxyVersion , d => d . version ) } </ td >
8484 </ tr >
85+ < tr >
86+ < td > < b > MPD Version:</ b > </ td >
87+ < td > { vResult ( mpdVersion , d => d . version ) } </ td >
88+ </ tr >
8589 </ tbody > </ table >
8690 </ >
8791}
Original file line number Diff line number Diff line change 11const TerserPlugin = require ( "terser-webpack-plugin" ) ;
22const path = require ( "path" ) ;
3+ const { DefinePlugin } = require ( "webpack" ) ;
4+
35
46module . exports = {
57 entry : "./src/index.js" ,
@@ -10,6 +12,13 @@ module.exports = {
1012 optimization : {
1113 minimizer : [ new TerserPlugin ( ) ] ,
1214 } ,
15+ plugins : [
16+ new DefinePlugin ( {
17+ __VERSION__ : JSON . stringify (
18+ process . env . FRONTEND_VERSION || "dev"
19+ ) ,
20+ } ) ,
21+ ] ,
1322 module : {
1423 rules : [
1524 {
You can’t perform that action at this time.
0 commit comments