mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-29 18:18:50 +00:00
27 lines
715 B
CoffeeScript
27 lines
715 B
CoffeeScript
npm = require('../npm')
|
|
packageJSON = require('../../package.json')
|
|
|
|
exports.update =
|
|
signature: 'update'
|
|
description: 'update the resin cli'
|
|
help: '''
|
|
Use this command to update the Resin CLI
|
|
|
|
This command outputs information about the update process.
|
|
Use `--quiet` to remove that output.
|
|
|
|
The Resin CLI checks for updates once per day.
|
|
|
|
Major updates require a manual update with this update command,
|
|
while minor updates are applied automatically.
|
|
|
|
Examples:
|
|
|
|
$ resin update
|
|
'''
|
|
action: (params, options, done) ->
|
|
npm.update packageJSON.name, (error, version) ->
|
|
return done(error) if error?
|
|
console.info("Upgraded #{packageJSON.name} to v#{version}.")
|
|
return done(null, version)
|