commit hash added to sourcecode link

This commit is contained in:
nklhrstv 2020-02-12 09:11:57 +02:00
parent 4781156012
commit 3d840507a9
2 changed files with 3 additions and 1 deletions

View file

@ -224,7 +224,7 @@ const Settings = () => {
</Button>
</div>
<div className={styles['option-container']}>
<Button className={classnames(styles['option-input-container'], styles['link-container'])} title={'Source code'} target={'_blank'} href={'https://github.com/stremio/stremio-web'}>
<Button className={classnames(styles['option-input-container'], styles['link-container'])} title={'Source code'} target={'_blank'} href={`https://github.com/stremio/stremio-web/commit/${process.env.COMMIT_HASH}`}>
<div className={styles['label']}>Source code</div>
</Button>
</div>

View file

@ -1,4 +1,5 @@
const path = require('path');
const child_process = require('child_process');
const webpack = require('webpack');
const HtmlWebPackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
@ -132,6 +133,7 @@ module.exports = (env, argv) => ({
new webpack.EnvironmentPlugin({
DEBUG: argv.mode !== 'production',
VERSION: pachageJson.version,
COMMIT_HASH: child_process.execSync('git rev-parse HEAD').toString(),
...env
}),
new webpack.ProgressPlugin(),