fix(cli): rename the update command references to upgrade across the CLI and documentation
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/nupst',
|
||||
version: '5.3.0',
|
||||
version: '5.3.1',
|
||||
description: 'Network UPS Shutdown Tool - Monitor SNMP-enabled UPS devices and orchestrate graceful system shutdowns during power emergencies'
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ export class NupstCli {
|
||||
case 'resume':
|
||||
await serviceHandler.resume();
|
||||
break;
|
||||
case 'update':
|
||||
case 'upgrade':
|
||||
await serviceHandler.update();
|
||||
break;
|
||||
case 'uninstall':
|
||||
@@ -557,7 +557,7 @@ export class NupstCli {
|
||||
this.printCommand('config [show]', 'Display current configuration');
|
||||
this.printCommand('pause [--duration <time>]', 'Pause action monitoring');
|
||||
this.printCommand('resume', 'Resume action monitoring');
|
||||
this.printCommand('update', 'Update NUPST from repository', theme.dim('(requires root)'));
|
||||
this.printCommand('upgrade', 'Upgrade NUPST from repository', theme.dim('(requires root)'));
|
||||
this.printCommand('uninstall', 'Completely remove NUPST', theme.dim('(requires root)'));
|
||||
this.printCommand('help, --help, -h', 'Show this help message');
|
||||
this.printCommand('--version, -v', 'Show version information');
|
||||
|
||||
@@ -254,7 +254,7 @@ export class ServiceHandler {
|
||||
try {
|
||||
// Check if running as root
|
||||
this.checkRootAccess(
|
||||
'This command must be run as root to update NUPST.',
|
||||
'This command must be run as root to upgrade NUPST.',
|
||||
);
|
||||
|
||||
console.log('');
|
||||
|
||||
@@ -338,7 +338,7 @@ export class NupstDaemon {
|
||||
logger.logBoxTitle('Update Available', boxWidth);
|
||||
logger.logBoxLine(`Current Version: ${updateStatus.currentVersion}`);
|
||||
logger.logBoxLine(`Latest Version: ${updateStatus.latestVersion}`);
|
||||
logger.logBoxLine('Run "sudo nupst update" to update');
|
||||
logger.logBoxLine('Run "sudo nupst upgrade" to upgrade');
|
||||
logger.logBoxEnd();
|
||||
}
|
||||
}).catch(() => {}); // Ignore errors checking for updates
|
||||
|
||||
@@ -235,7 +235,7 @@ export class Nupst implements INupstAccessor {
|
||||
|
||||
if (this.updateAvailable && this.latestVersion) {
|
||||
logger.logBoxLine(`Update Available: ${this.latestVersion}`);
|
||||
logger.logBoxLine('Run "sudo nupst update" to update');
|
||||
logger.logBoxLine('Run "sudo nupst upgrade" to upgrade');
|
||||
logger.logBoxEnd();
|
||||
} else if (checkForUpdates) {
|
||||
logger.logBoxLine('Checking for updates...');
|
||||
@@ -244,7 +244,7 @@ export class Nupst implements INupstAccessor {
|
||||
this.checkForUpdates().then((updateAvailable) => {
|
||||
if (updateAvailable) {
|
||||
logger.logBoxLine(`Update Available: ${this.latestVersion}`);
|
||||
logger.logBoxLine('Run "sudo nupst update" to update');
|
||||
logger.logBoxLine('Run "sudo nupst upgrade" to upgrade');
|
||||
} else {
|
||||
logger.logBoxLine('You are running the latest version');
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ WantedBy=multi-user.target
|
||||
}`,
|
||||
);
|
||||
logger.log(
|
||||
` ${theme.dim('Run')} ${theme.command('sudo nupst update')} ${theme.dim('to upgrade')}`,
|
||||
` ${theme.dim('Run')} ${theme.command('sudo nupst upgrade')} ${theme.dim('to upgrade')}`,
|
||||
);
|
||||
} else {
|
||||
logger.log('');
|
||||
|
||||
Reference in New Issue
Block a user