Log version number and git-sha on server start

pull/2589/head
Stefan 2015-04-11 00:13:04 +02:00
parent 8e4c961207
commit db5bdc8719
3 changed files with 8 additions and 1 deletions

View File

@ -13,6 +13,8 @@ exports.createServer = function () {
console.log("Report bugs at https://github.com/ether/etherpad-lite/issues")
serverName = "Etherpad " + settings.getGitCommit() + " (http://etherpad.org)";
console.log("Your Etherpad version is " + settings.getEpVersion() + " (" + settings.getGitCommit() + ")");
exports.restartServer();

View File

@ -4,7 +4,6 @@ var installer = require('ep_etherpad-lite/static/js/pluginfw/installer');
var plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins');
var _ = require('underscore');
var semver = require('semver');
var epVersion = require('ep_etherpad-lite/package.json').version;
exports.expressCreateServer = function (hook_name, args, cb) {
args.app.get('/admin/plugins', function(req, res) {
@ -18,6 +17,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
});
args.app.get('/admin/plugins/info', function(req, res) {
var gitCommit = settings.getGitCommit();
var epVersion = settings.getEpVersion();
res.send( eejs.require("ep_etherpad-lite/templates/admin/plugins-info.html",
{
gitCommit: gitCommit,

View File

@ -207,6 +207,11 @@ exports.getGitCommit = function() {
return version;
}
// Return etherpad version from package.json
exports.getEpVersion = function() {
return require('ep_etherpad-lite/package.json').version;
}
exports.reloadSettings = function reloadSettings() {
// Discover where the settings file lives
var settingsFilename = argv.settings || "settings.json";