1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-25 16:38:08 +00:00

Added commit hash to footer

This commit is contained in:
Vladimir Volek 2018-09-20 13:56:24 +02:00
parent c9b9359e70
commit c9ec9e4438
6 changed files with 20 additions and 2 deletions

View File

@ -4,6 +4,9 @@
"plugin:flowtype/recommended",
"plugin:jest/recommended"
],
"globals": {
"COMMITHASH": true
},
"env": {
"browser": true,
"jest": true

View File

@ -31,6 +31,7 @@
"ethereumjs-tx": "^1.3.3",
"ethereumjs-units": "^0.2.0",
"ethereumjs-util": "^5.1.4",
"git-revision-webpack-plugin": "^3.0.3",
"hdkey": "^0.8.0",
"html-webpack-plugin": "^3.2.0",
"npm-run-all": "^4.1.3",

View File

@ -29,7 +29,7 @@ const Copy = styled.div`
const Footer = ({ toggle }) => (
<Wrapper>
<Copy>&copy; {getYear(new Date())}</Copy>
<Copy title={COMMITHASH}>&copy; {getYear(new Date())}</Copy>
<StyledLink href="http://satoshilabs.com" target="_blank" rel="noreferrer noopener" isGreen>SatoshiLabs</StyledLink>
<StyledLink href="/assets/tos.pdf" target="_blank" rel="noreferrer noopener" isGreen>Terms</StyledLink>
<StyledLink onClick={toggle} isGreen>Show Log</StyledLink>

View File

@ -1,5 +1,5 @@
import webpack from 'webpack';
import GitRevisionPlugin from 'git-revision-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
@ -7,6 +7,7 @@ import {
SRC, BUILD, PORT, PUBLIC,
} from './constants';
const gitRevisionPlugin = new GitRevisionPlugin();
module.exports = {
watch: true,
@ -89,6 +90,9 @@ module.exports = {
hints: false,
},
plugins: [
new webpack.DefinePlugin({
COMMITHASH: JSON.stringify(gitRevisionPlugin.commithash()),
}),
new HtmlWebpackPlugin({
chunks: ['index'],
template: `${SRC}index.html`,

View File

@ -1,9 +1,12 @@
import webpack from 'webpack';
import GitRevisionPlugin from 'git-revision-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import CopyWebpackPlugin from 'copy-webpack-plugin';
import { SRC, BUILD, PUBLIC } from './constants';
const gitRevisionPlugin = new GitRevisionPlugin();
module.exports = {
mode: 'production',
entry: {
@ -60,6 +63,9 @@ module.exports = {
hints: false,
},
plugins: [
new webpack.DefinePlugin({
COMMITHASH: JSON.stringify(gitRevisionPlugin.commithash()),
}),
new HtmlWebpackPlugin({
chunks: ['index'],
template: `${SRC}index.html`,

View File

@ -4519,6 +4519,10 @@ gh-got@^6.0.0:
got "^7.0.0"
is-plain-obj "^1.1.0"
git-revision-webpack-plugin@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/git-revision-webpack-plugin/-/git-revision-webpack-plugin-3.0.3.tgz#f909949d7851d1039ed530518f73f5d46594e66f"
github-username@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/github-username/-/github-username-4.1.0.tgz#cbe280041883206da4212ae9e4b5f169c30bf417"