mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Improve server version logging info
- Capture commit date and print that next to the branch - Info for being on a dev branch - Info for not being on the latest commit (fetch should've gotten it, if update script was run)
This commit is contained in:
13
server.js
13
server.js
@ -475,7 +475,18 @@ const autorunUrl = new URL(
|
||||
const setupTasks = async function () {
|
||||
const version = await getVersion();
|
||||
|
||||
console.log(`SillyTavern ${version.pkgVersion}` + (version.gitBranch ? ` '${version.gitBranch}' (${version.gitRevision})` : ''));
|
||||
// Print formatted header
|
||||
console.log();
|
||||
console.log(`SillyTavern ${version.pkgVersion}`);
|
||||
console.log(version.gitBranch ? `Running '${version.gitBranch}' (${version.gitRevision}) - ${version.commitDate}` : '');
|
||||
if (version.gitBranch && !['staging', 'release'].includes(version.gitBranch)) {
|
||||
console.log('INFO: Currently running a dev branch.');
|
||||
console.log(` If this isn't a dev environment, consider switching via 'git switch staging' or 'git switch release'.`);
|
||||
} else if (version.gitBranch && !version.isLatest) {
|
||||
console.log('INFO: Currently not on the latest commit.');
|
||||
console.log(` Run 'git pull' to upate. If you have any conflicts, run 'git reset --hard' and 'git pull' to reset your branch.`)
|
||||
}
|
||||
console.log();
|
||||
|
||||
// TODO: do endpoint init functions depend on certain directories existing or not existing? They should be callable
|
||||
// in any order for encapsulation reasons, but right now it's unknown if that would break anything.
|
||||
|
Reference in New Issue
Block a user