From c139de9d6039648902be5906d1e6072dad45254c Mon Sep 17 00:00:00 2001 From: SirStendec Date: Mon, 16 Jul 2018 13:57:56 -0400 Subject: [PATCH] 4.0.0-rc5.3 * Fixed: Twitch emotes not displaying in Whispers. * Fixed: Alignment of in-line actions when using Emote Alignment: Padded. * Changed: Display the git commit hash for the current build in the FFZ Control Center, rather than the webpack build hash. --- src/main.js | 3 ++- src/modules/chat/actions/index.jsx | 2 +- src/modules/chat/index.js | 2 +- src/modules/main_menu/components/main-menu.vue | 13 ++++++++++++- src/raven.js | 1 + src/sites/twitch-twilight/modules/chat/line.js | 3 +-- webpack.web.dev.js | 6 +++++- webpack.web.prod.js | 8 ++++++++ 8 files changed, 31 insertions(+), 7 deletions(-) diff --git a/src/main.js b/src/main.js index b225f6cc..69082eab 100644 --- a/src/main.js +++ b/src/main.js @@ -100,7 +100,8 @@ class FrankerFaceZ extends Module { FrankerFaceZ.Logger = Logger; const VER = FrankerFaceZ.version_info = { - major: 4, minor: 0, revision: 0, extra: '-rc5.2', + major: 4, minor: 0, revision: 0, extra: '-rc5.3', + commit: __git_commit__, build: __webpack_hash__, toString: () => `${VER.major}.${VER.minor}.${VER.revision}${VER.extra || ''}${DEBUG ? '-dev' : ''}` diff --git a/src/modules/chat/actions/index.jsx b/src/modules/chat/actions/index.jsx index a8683a61..afbfce7f 100644 --- a/src/modules/chat/actions/index.jsx +++ b/src/modules/chat/actions/index.jsx @@ -252,7 +252,7 @@ export default class Actions extends Module { }); return (
- {{ version.build }} + + {{ version.commit.slice(0,7) }} + + + {{ version.build }} +
diff --git a/src/raven.js b/src/raven.js index b365dd0e..d7f2b79e 100644 --- a/src/raven.js +++ b/src/raven.js @@ -277,6 +277,7 @@ export default class RavenLogger extends Module { out = {}; out.build = __webpack_hash__; + out.git_commit = __git_commit__; if ( core ) out.twitch_build = core.config.buildID; diff --git a/src/sites/twitch-twilight/modules/chat/line.js b/src/sites/twitch-twilight/modules/chat/line.js index 0f8ddb3d..9123b53d 100644 --- a/src/sites/twitch-twilight/modules/chat/line.js +++ b/src/sites/twitch-twilight/modules/chat/line.js @@ -223,8 +223,7 @@ export default class ChatLine extends Module { props.showTimestamps !== this.props.showTimestamps; } - cls.prototype.render = function() { - try { + cls.prototype.render = function() { try { const types = t.parent.message_types || {}, diff --git a/webpack.web.dev.js b/webpack.web.dev.js index cf2e4fb5..59945103 100644 --- a/webpack.web.dev.js +++ b/webpack.web.dev.js @@ -4,6 +4,7 @@ const merge = require('webpack-merge'); const common = require('./webpack.web.common.js'); const CopyPlugin = require('copy-webpack-plugin'); +const webpack = require('webpack'); /* global module */ @@ -16,7 +17,10 @@ module.exports = merge(common, { from: './src/entry.js', to: 'script.js' } - ]) + ]), + new webpack.DefinePlugin({ + __git_commit__: null + }) ], devServer: { diff --git a/webpack.web.prod.js b/webpack.web.prod.js index 01a1ac4c..b941028d 100644 --- a/webpack.web.prod.js +++ b/webpack.web.prod.js @@ -1,3 +1,4 @@ +const webpack = require('webpack'); const merge = require('webpack-merge'); const common = require('./webpack.web.common.js'); @@ -8,6 +9,10 @@ const CleanPlugin = require('clean-webpack-plugin'); const uglify = require('uglify-es'); +// Get Git info + +const commit_hash = require('child_process').execSync('git rev-parse HEAD').toString().trim(); + /* global module Buffer */ const config = module.exports = merge(common, { @@ -28,6 +33,9 @@ const config = module.exports = merge(common, { } } }), + new webpack.DefinePlugin({ + __git_commit__: JSON.stringify(commit_hash) + }), new CopyPlugin([ { from: './src/entry.js',