mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add commit sha to version information
This commit is contained in:
parent
f2e6153541
commit
8961a19154
5 changed files with 23 additions and 2 deletions
|
@ -23,6 +23,15 @@ const LibarchiveWasm = [
|
|||
];
|
||||
|
||||
const DEV_MODE = process.env.NODE_ENV !== 'production';
|
||||
let COMMIT_SHA = '';
|
||||
try {
|
||||
COMMIT_SHA = require('child_process')
|
||||
.execSync('git describe --always --dirty')
|
||||
.toString()
|
||||
.trim();
|
||||
} catch (err) {
|
||||
console.warn('Failed to get commit sha. Is git installed?', err);
|
||||
}
|
||||
|
||||
const NODE_MODULES_REGEX = /[\\/]node_modules[\\/]/;
|
||||
|
||||
|
@ -48,6 +57,7 @@ const config = {
|
|||
},
|
||||
plugins: [
|
||||
new DefinePlugin({
|
||||
__COMMIT_SHA__: JSON.stringify(COMMIT_SHA),
|
||||
__JF_BUILD_VERSION__: JSON.stringify(
|
||||
process.env.WEBPACK_SERVE ?
|
||||
'Dev Server' :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue