Add git commit id to end of explorer version
This commit is contained in:
@@ -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;
|
||||
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user