update version reporting to include git branch, in prep for v1.0
This commit is contained in:
@@ -24,7 +24,10 @@ function go() {
|
|||||||
location.href=document.access.url.value;
|
location.href=document.access.url.value;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<h4>Welcome to `+ z_title + `</h4>
|
<b>Welcome to `+ z_title + `</b><br>
|
||||||
|
`;
|
||||||
|
if (minisrv_config.config.git_commit) data += "<small><i>" + " ".repeat(32) + "git revision " + minisrv_config.config.git_commit + "</i></small><br>";
|
||||||
|
data += `
|
||||||
<b>Encryption Status</b>: ${cryptstatus}<br>
|
<b>Encryption Status</b>: ${cryptstatus}<br>
|
||||||
<b>Connection Speed</b>: &rate;
|
<b>Connection Speed</b>: &rate;
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -24,9 +24,7 @@ data = `<html>
|
|||||||
Mini service
|
Mini service
|
||||||
<tr><td>
|
<tr><td>
|
||||||
zefie minisrv v${minisrv_config.version}`;
|
zefie minisrv v${minisrv_config.version}`;
|
||||||
if (getGitRevision()) {
|
if (minisrv_config.config.git_commit) data += " (git " + minisrv_config.config.git_commit + ")";
|
||||||
data += " (git " + getGitRevision().substring(0, 8) + ")";
|
|
||||||
}
|
|
||||||
data += `
|
data += `
|
||||||
<tr><td>&rate;
|
<tr><td>&rate;
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -24,9 +24,7 @@ data = `<html>
|
|||||||
Mini service
|
Mini service
|
||||||
<tr><td>
|
<tr><td>
|
||||||
zefie minisrv v${minisrv_config.version}`;
|
zefie minisrv v${minisrv_config.version}`;
|
||||||
if (getGitRevision()) {
|
if (minisrv_config.config.git_commit) data += " (git " + minisrv_config.config.git_commit + ")";
|
||||||
data += " (git " + getGitRevision().substring(0, 8) + ")";
|
|
||||||
}
|
|
||||||
data += `
|
data += `
|
||||||
<tr><td>&rate;
|
<tr><td>&rate;
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -50,6 +50,10 @@ Content-Type: text/html`
|
|||||||
<td valign=top align=right><shadow>Connected to:</shadow>
|
<td valign=top align=right><shadow>Connected to:</shadow>
|
||||||
<td width=10>
|
<td width=10>
|
||||||
<td valign=top>Mini Service
|
<td valign=top>Mini Service
|
||||||
|
<tr>
|
||||||
|
<td valign=top align=right><shadow>Host/Port:</shadow>
|
||||||
|
<td width=10>
|
||||||
|
<td valign=top>${service_ip}/${minisrv_config.services[service_name].port}
|
||||||
<tr>
|
<tr>
|
||||||
<td valign=top align=right width=150><shadow>Service:</shadow>
|
<td valign=top align=right width=150><shadow>Service:</shadow>
|
||||||
<td width=10>
|
<td width=10>
|
||||||
@@ -76,10 +80,6 @@ Content-Type: text/html`
|
|||||||
<td valign=top align=right><shadow>Client IP number:</shadow>
|
<td valign=top align=right><shadow>Client IP number:</shadow>
|
||||||
<td width=10>
|
<td width=10>
|
||||||
<td valign=top>${socket.remoteAddress}
|
<td valign=top>${socket.remoteAddress}
|
||||||
<tr>
|
|
||||||
<td valign=top align=right><shadow>Service IP number:</shadow>
|
|
||||||
<td width=10>
|
|
||||||
<td valign=top>${service_ip}
|
|
||||||
`;
|
`;
|
||||||
if (ssid_sessions[socket.ssid].getSessionData("registered")) {
|
if (ssid_sessions[socket.ssid].getSessionData("registered")) {
|
||||||
data += `<tr>
|
data += `<tr>
|
||||||
|
|||||||
@@ -1279,7 +1279,7 @@ function getGitRevision() {
|
|||||||
if (rev.indexOf(':') === -1) {
|
if (rev.indexOf(':') === -1) {
|
||||||
return rev;
|
return rev;
|
||||||
} else {
|
} else {
|
||||||
return fs.readFileSync(__dirname + path.sep + ".." + path.sep + ".git" + path.sep + rev.substring(5)).toString().trim();
|
return fs.readFileSync(__dirname + path.sep + ".." + path.sep + ".git" + path.sep + rev.substring(5)).toString().trim().substring(0,8) + "-" + rev.split('/').pop();
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return null;
|
return null;
|
||||||
@@ -1288,11 +1288,7 @@ function getGitRevision() {
|
|||||||
|
|
||||||
// SERVER START
|
// SERVER START
|
||||||
var git_commit = getGitRevision()
|
var git_commit = getGitRevision()
|
||||||
if (git_commit) {
|
var z_title = "zefie's wtv minisrv v" + require('./package.json').version;
|
||||||
var z_title = "zefie's wtv minisrv v" + require('./package.json').version + " (git " + git_commit.substring(0,8) + ")";
|
|
||||||
} else {
|
|
||||||
var z_title = "zefie's wtv minisrv v" + require('./package.json').version;
|
|
||||||
}
|
|
||||||
console.log("**** Welcome to " + z_title + " ****");
|
console.log("**** Welcome to " + z_title + " ****");
|
||||||
console.log(" *** Reading global configuration...");
|
console.log(" *** Reading global configuration...");
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user