mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-05-05 20:26:49 +02:00
get the proper git revision even when not started from node dir
This commit is contained in:
parent
b1faa8e0f8
commit
7dcc7be8e0
@ -45,8 +45,9 @@ var socketIORouter;
|
||||
var version = "";
|
||||
try
|
||||
{
|
||||
var ref = fs.readFileSync("../.git/HEAD", "utf-8");
|
||||
var refPath = "../.git/" + ref.substring(5, ref.indexOf("\n"));
|
||||
var rootPath = path.normalize(__dirname + "/../")
|
||||
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 = version.substring(0, 7);
|
||||
console.log("Your Etherpad Lite git version is " + version);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user