From a862eca354d8bede490ef2fab018205681b503a5 Mon Sep 17 00:00:00 2001 From: flashwave Date: Sat, 10 Feb 2024 04:17:19 +0000 Subject: [PATCH] Added link to compiled commit. --- build.js | 9 +++++++++ src/mami.js/ui/settings.jsx | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) 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 ; };