PATH:
usr
/
local
/
lib
/
node_modules
/
ghost-cli
/
lib
/
commands
const Command = require('../command'); class CheckUpdateCommand extends Command { async run({v1}) { const semver = require('semver'); const {loadVersions} = require('../utils/version'); const instance = this.system.getInstance(); if (instance.version) { const {latest, latestMajor} = await loadVersions(); const versionToCheck = v1 ? latestMajor.v1 : latest; if (semver.gt(versionToCheck, instance.version)) { const diff = semver.diff(instance.version, versionToCheck); this.ui.log(`New ${diff} version available: ${versionToCheck}`); } } } } CheckUpdateCommand.description = 'Check if an update is available for a Ghost installation'; CheckUpdateCommand.allowRoot = true; CheckUpdateCommand.options = { v1: { describe: 'Limit check to Ghost 1.x releases', type: 'boolean', default: false } }; module.exports = CheckUpdateCommand;
[-] stop.js
[edit]
[-] migrate.js
[edit]
[-] restart.js
[edit]
[+]
..
[-] run.js
[edit]
[-] import.js
[edit]
[-] install.js
[edit]
[-] export.js
[edit]
[-] uninstall.js
[edit]
[+]
doctor
[-] check-update.js
[edit]
[-] start.js
[edit]
[-] config.js
[edit]
[-] update.js
[edit]
[-] ls.js
[edit]
[-] setup.js
[edit]
[-] buster.js
[edit]
[-] log.js
[edit]
[-] version.js
[edit]