Add git commit id to end of explorer version

This commit is contained in:
Joe Uhren
2022-04-11 14:43:02 -06:00
parent e9cf83517f
commit 6d3bceb4df
3 changed files with 12 additions and 1 deletions
+10
View File
@@ -14,6 +14,7 @@ var express = require('express'),
request = require('postman-request');
var app = express();
var apiAccessList = [];
const { exec } = require('child_process');
// pass wallet rpc connection info to nodeapi
nodeapi.setWalletDetails(settings.wallet);
@@ -782,4 +783,13 @@ if (settings.webserver.tls.enabled == true) {
https.createServer(tls_options, app).listen(settings.webserver.tls.port);
}
// get the latest git commit id (if exists)
exec('git rev-parse HEAD', (err, stdout, stderr) => {
// check if the commit id was returned
if (stdout != null && stdout != '') {
// set the explorer revision code based on the git commit id
app.set('revision', stdout.substring(0, 7));
}
});
module.exports = app;
+1
View File
@@ -518,6 +518,7 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
margin-bottom: 0.1rem;
}
.poweredby {
white-space: normal;
margin-right: 0.2rem;
font-size: 80%;
}
+1 -1
View File
@@ -787,7 +787,7 @@ html(lang='en')
ul.nav.justify-content-center
li.text-center
p
a.nav-link.poweredby.border-0(href='https://github.com/team-exor/eiquidus', target='_blank') eIquidus Explorer v#{settings.explorer_version}
a.nav-link.poweredby.border-0(href='https://github.com/team-exor/eiquidus', target='_blank') eIquidus Explorer v#{settings.explorer_version}#{(settings.revision == null || settings.revision == '' ? '' : `-${settings.revision}`)}
.col-4.navbar-nav
ui.nav.justify-content-end
label#lblBlockcount.badge.nav-link.border-0.float-end