mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-29 15:44:26 +00:00
Upgrade Resin VCS to v1.2.0 and make use of vcs.getApplicationName()
This commit is contained in:
parent
42b2e2fcf0
commit
7bd8922a4e
@ -120,17 +120,7 @@
|
||||
if (options.application != null) {
|
||||
return callback(null, options.application);
|
||||
}
|
||||
return vcs.getApplicationId(process.cwd(), function(error, applicationId) {
|
||||
if (error != null) {
|
||||
return callback(error);
|
||||
}
|
||||
return resin.models.application.getById(applicationId, function(error, application) {
|
||||
if (error != null) {
|
||||
return callback(error);
|
||||
}
|
||||
return callback(null, application.app_name);
|
||||
});
|
||||
});
|
||||
return vcs.getApplicationName(process.cwd(), callback);
|
||||
}, function(applicationName, callback) {
|
||||
params.name = applicationName;
|
||||
if (params.device != null) {
|
||||
|
@ -195,13 +195,7 @@ exports.init =
|
||||
|
||||
(callback) ->
|
||||
return callback(null, options.application) if options.application?
|
||||
|
||||
# TODO: Extract this to vcs.getApplicationName()
|
||||
vcs.getApplicationId process.cwd(), (error, applicationId) ->
|
||||
return callback(error) if error?
|
||||
resin.models.application.getById applicationId, (error, application) ->
|
||||
return callback(error) if error?
|
||||
return callback(null, application.app_name)
|
||||
vcs.getApplicationName(process.cwd(), callback)
|
||||
|
||||
(applicationName, callback) ->
|
||||
params.name = applicationName
|
||||
|
@ -65,7 +65,7 @@
|
||||
"resin-cli-visuals": "^0.1.0",
|
||||
"resin-sdk": "^1.2.0",
|
||||
"resin-settings-client": "^1.0.0",
|
||||
"resin-vcs": "^1.1.0",
|
||||
"resin-vcs": "^1.2.0",
|
||||
"underscore.string": "~2.4.0",
|
||||
"update-notifier": "^0.3.1"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user