diff --git a/build.js b/build.js index eb0b3e2..af443dc 100644 --- a/build.js +++ b/build.js @@ -5,6 +5,7 @@ const path = require('path'); const util = require('util'); const postcss = require('postcss'); const htmlminify = require('html-minifier-terser').minify; +const childProcess = require('child_process'); const utils = require('./src/utils.js'); const assproc = require('./src/assproc.js'); @@ -102,6 +103,14 @@ const htmlMinifyOptions = { FUTAMI_URL: config.common_url, MAMI_URL: config.modern_url, AMI_URL: config.compat_url, + GIT_HASH: await (() => { + return new Promise((resolve, reject) => { + childProcess.exec('git log --pretty="%H" -n1 HEAD', (err, stdout) => { + if(err) reject(err); + else resolve(stdout.trim()); + }); + }); + })(), }; console.log('Ensuring assets directory exists...'); diff --git a/src/mami.js/ui/settings.jsx b/src/mami.js/ui/settings.jsx index 68c01b3..1d54bfd 100644 --- a/src/mami.js/ui/settings.jsx +++ b/src/mami.js/ui/settings.jsx @@ -411,8 +411,8 @@ Umi.UI.Settings = (function() { const createCopyright = function() { return ; };