Upgrade Resin VCS to v1.2.0 and make use of vcs.getApplicationName()

This commit is contained in:
Juan Cruz Viotti 2015-04-20 11:41:26 -04:00
parent 42b2e2fcf0
commit 7bd8922a4e
3 changed files with 3 additions and 19 deletions

View File

@ -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) {

View File

@ -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

View File

@ -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"
}