Added link to compiled commit.

This commit is contained in:
flash 2024-02-10 04:17:19 +00:00
parent 11fe3ebcd1
commit a862eca354
2 changed files with 11 additions and 2 deletions

View file

@ -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...');

View file

@ -411,8 +411,8 @@ Umi.UI.Settings = (function() {
const createCopyright = function() {
return <div class="mami-copyright">
<a href="//patchii.net/flashii/mami" target="_blank">Mami</a> © <a href="//flash.moe" target="_blank">flash.moe</a><br/>
<a href="//railgun.sh/sockchat" target="_blank">Sock Chat documentation</a>
<a href="//patchii.net/flashii/mami" target="_blank">Mami</a> # <a href={`//patchii.net/flashii/mami/commit/${GIT_HASH}`} target="_blank">{GIT_HASH.substring(0, 7)}</a> © <a href="//flash.moe" target="_blank">flash.moe</a><br/>
<a href="//railgun.sh/sockchat" target="_blank">Sock Chat documentation</a><br/>
</div>;
};