Browse Source

Merge branch 'shesek-no-git'

fix-133-memory-crash
Dan Janosik 6 years ago
parent
commit
48b289a4ec
  1. 3
      app.js
  2. 9
      views/layout.pug

3
app.js

@ -329,8 +329,9 @@ app.runOnStartup = function() {
});
}
if (global.sourcecodeVersion == null) {
if (global.sourcecodeVersion == null && fs.existsSync('.git')) {
simpleGit(".").log(["-n 1"], function(err, log) {
if (err) { return console.error('error accessing git repo:', err); }
global.sourcecodeVersion = log.all[0].hash.substring(0, 10);
global.sourcecodeDate = log.all[0].date.substring(0, "0000-00-00".length);
});

9
views/layout.pug

@ -124,10 +124,11 @@ html(lang="en")
dd
a(href="https://github.com/janoside/btc-rpc-explorer") github.com/janoside/btc-rpc-explorer
dt Running Version
dd
a(href=("https://github.com/janoside/btc-rpc-explorer/commit/" + sourcecodeVersion)) #{sourcecodeVersion}
span(style="color: #ccc;") (#{sourcecodeDate})
if (sourcecodeVersion)
dt Running Version
dd
a(href=("https://github.com/janoside/btc-rpc-explorer/commit/" + sourcecodeVersion)) #{sourcecodeVersion}
span(style="color: #ccc;") (#{sourcecodeDate})
if (config.demoSite)
dt Public Demos

Loading…
Cancel
Save