mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 05:37:51 +00:00
Auto-merge for PR #701 via VersionBot
Allow specifying `--commit=latest` for `resin preload`
This commit is contained in:
commit
10d688c02d
@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
|
||||
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## v6.7.3 - 2017-10-25
|
||||
|
||||
* Allow specifying `--commit=latest` for `resin preload` #701 [Alexis Svinartchouk]
|
||||
|
||||
## v6.7.2 - 2017-10-24
|
||||
|
||||
* Make update-notifier more resilient and ensure it obeys NO_UPDATE_NOTIFIER, by updating it #699 [Tim Perry]
|
||||
|
@ -140,7 +140,7 @@ module.exports = {
|
||||
}, {
|
||||
signature: 'commit',
|
||||
parameter: 'hash',
|
||||
description: 'a specific application commit to preload (ignored if no appId is given)',
|
||||
description: 'a specific application commit to preload, use "latest" to specify the latest commit\n(ignored if no appId is given)',
|
||||
alias: 'c'
|
||||
}, {
|
||||
signature: 'splash-image',
|
||||
@ -242,7 +242,9 @@ module.exports = {
|
||||
}
|
||||
return Promise["try"](function() {
|
||||
if (options.commit) {
|
||||
if (!_.find(application.build, {
|
||||
if (options.commit === LATEST && application.commit) {
|
||||
return LATEST;
|
||||
} else if (!_.find(application.build, {
|
||||
commit_hash: options.commit
|
||||
})) {
|
||||
expectedError('There is no build matching this commit');
|
||||
|
@ -128,7 +128,10 @@ module.exports =
|
||||
{
|
||||
signature: 'commit'
|
||||
parameter: 'hash'
|
||||
description: 'a specific application commit to preload (ignored if no appId is given)'
|
||||
description: '''
|
||||
a specific application commit to preload, use "latest" to specify the latest commit
|
||||
(ignored if no appId is given)
|
||||
'''
|
||||
alias: 'c'
|
||||
}
|
||||
{
|
||||
@ -251,13 +254,14 @@ module.exports =
|
||||
# Use the commit given as --commit or show an interactive commit selection menu
|
||||
Promise.try ->
|
||||
if options.commit
|
||||
if not _.find(application.build, commit_hash: options.commit)
|
||||
if options.commit == LATEST and application.commit
|
||||
# handle `--commit latest`
|
||||
return LATEST
|
||||
else if not _.find(application.build, commit_hash: options.commit)
|
||||
expectedError('There is no build matching this commit')
|
||||
return options.commit
|
||||
selectApplicationCommit(application.build)
|
||||
.then (commit) ->
|
||||
|
||||
# No commit specified => use the latest commit
|
||||
if commit == LATEST
|
||||
preloader.commit = application.commit
|
||||
else
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "resin-cli",
|
||||
"version": "6.7.2",
|
||||
"version": "6.7.3",
|
||||
"description": "The official resin.io CLI tool",
|
||||
"main": "./build/actions/index.js",
|
||||
"homepage": "https://github.com/resin-io/resin-cli",
|
||||
@ -86,7 +86,7 @@
|
||||
"resin-doodles": "0.0.1",
|
||||
"resin-image-fs": "^2.3.0",
|
||||
"resin-image-manager": "^5.0.0",
|
||||
"resin-preload": "^4.0.2",
|
||||
"resin-preload": "^4.0.9",
|
||||
"resin-sdk": "^7.0.0",
|
||||
"resin-sdk-preconfigured": "^6.9.0",
|
||||
"resin-settings-client": "^3.6.1",
|
||||
|
Loading…
Reference in New Issue
Block a user