mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
get the proper git revision even when not started from node dir
This commit is contained in:
parent
b1faa8e0f8
commit
7dcc7be8e0
1 changed files with 3 additions and 2 deletions
|
@ -45,8 +45,9 @@ var socketIORouter;
|
||||||
var version = "";
|
var version = "";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var ref = fs.readFileSync("../.git/HEAD", "utf-8");
|
var rootPath = path.normalize(__dirname + "/../")
|
||||||
var refPath = "../.git/" + ref.substring(5, ref.indexOf("\n"));
|
var ref = fs.readFileSync(rootPath + ".git/HEAD", "utf-8");
|
||||||
|
var refPath = rootPath + ".git/" + ref.substring(5, ref.indexOf("\n"));
|
||||||
version = fs.readFileSync(refPath, "utf-8");
|
version = fs.readFileSync(refPath, "utf-8");
|
||||||
version = version.substring(0, 7);
|
version = version.substring(0, 7);
|
||||||
console.log("Your Etherpad Lite git version is " + version);
|
console.log("Your Etherpad Lite git version is " + version);
|
||||||
|
|
Loading…
Reference in a new issue