mirror of
https://github.com/serverless/serverless.git
synced 2026-02-01 16:07:28 +00:00
Merge pull request #4301 from RafalWilinski/update-available-notification
Print message that an update is available if user runs Serverless command with an outdated version
This commit is contained in:
commit
464d0b22b5
@ -5,6 +5,8 @@ require('shelljs/global');
|
||||
const path = require('path');
|
||||
const BbPromise = require('bluebird');
|
||||
const os = require('os');
|
||||
const updateNotifier = require('update-notifier');
|
||||
const pkg = require('../package.json');
|
||||
const CLI = require('./classes/CLI');
|
||||
const Config = require('./classes/Config');
|
||||
const YamlParser = require('./classes/YamlParser');
|
||||
@ -58,6 +60,9 @@ class Serverless {
|
||||
this.pluginManager.setCliOptions(this.processedInput.options);
|
||||
this.pluginManager.setCliCommands(this.processedInput.commands);
|
||||
|
||||
// Check if update is available
|
||||
updateNotifier({ pkg }).notify();
|
||||
|
||||
return this.service.load(this.processedInput.options)
|
||||
.then(() => {
|
||||
// load all plugins
|
||||
|
||||
@ -122,6 +122,7 @@
|
||||
"semver-regex": "^1.0.0",
|
||||
"shelljs": "^0.6.0",
|
||||
"tabtab": "^2.2.2",
|
||||
"update-notifier": "^2.2.0",
|
||||
"uuid": "^2.0.2",
|
||||
"write-file-atomic": "^2.1.0",
|
||||
"yaml-ast-parser": "0.0.34"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user