diff --git a/build/actions/app.js b/build/actions/app.js index 32c0b35e..44f28fec 100644 --- a/build/actions/app.js +++ b/build/actions/app.js @@ -129,11 +129,11 @@ if (!confirmed) { return done(); } - return vcs.initialize(currentDirectory, callback); + return vcs.initialize(currentDirectory).nodeify(callback); }, function(callback) { return resin.models.application.get(params.name, callback); }, function(application, callback) { - return vcs.addRemote(currentDirectory, application.git_repository, callback); + return vcs.associate(currentDirectory, application.git_repository).nodeify(callback); } ], function(error, remoteUrl) { if (error != null) { diff --git a/build/actions/device.js b/build/actions/device.js index a801b4c4..6efe2322 100644 --- a/build/actions/device.js +++ b/build/actions/device.js @@ -192,7 +192,7 @@ if (options.application != null) { return callback(null, options.application); } - return vcs.getApplicationName(process.cwd(), callback); + return vcs.getApplicationName(process.cwd()).nodeify(callback); }, function(applicationName, callback) { options.application = applicationName; return resin.models.application.has(options.application, callback); diff --git a/build/actions/examples.js b/build/actions/examples.js index bdea13c4..ac572033 100644 --- a/build/actions/examples.js +++ b/build/actions/examples.js @@ -80,8 +80,7 @@ return done(error); } console.info("Cloning " + example.display_name + " to " + destination); - vcs.clone(example.repository, destination, done); - return done(); + return vcs.clone(example.repository, destination).nodeify(done); }); } }; diff --git a/lib/actions/app.coffee b/lib/actions/app.coffee index 00a26e1d..5fe815a5 100644 --- a/lib/actions/app.coffee +++ b/lib/actions/app.coffee @@ -175,13 +175,13 @@ exports.associate = (confirmed, callback) -> return done() if not confirmed - vcs.initialize(currentDirectory, callback) + vcs.initialize(currentDirectory).nodeify(callback) (callback) -> resin.models.application.get(params.name, callback) (application, callback) -> - vcs.addRemote(currentDirectory, application.git_repository, callback) + vcs.associate(currentDirectory, application.git_repository).nodeify(callback) ], (error, remoteUrl) -> return done(error) if error? diff --git a/lib/actions/device.coffee b/lib/actions/device.coffee index e493ab18..2e766c0a 100644 --- a/lib/actions/device.coffee +++ b/lib/actions/device.coffee @@ -272,7 +272,7 @@ exports.init = (callback) -> return callback(null, options.application) if options.application? - vcs.getApplicationName(process.cwd(), callback) + vcs.getApplicationName(process.cwd()).nodeify(callback) (applicationName, callback) -> options.application = applicationName diff --git a/lib/actions/examples.coffee b/lib/actions/examples.coffee index 5a8a9532..36c9f14f 100644 --- a/lib/actions/examples.coffee +++ b/lib/actions/examples.coffee @@ -91,5 +91,4 @@ exports.clone = mkdirp destination, (error) -> return done(error) if error? console.info("Cloning #{example.display_name} to #{destination}") - vcs.clone(example.repository, destination, done) - return done() + vcs.clone(example.repository, destination).nodeify(done) diff --git a/man/resin-completion.1 b/man/resin-completion.1 index 4b210238..57477895 100644 --- a/man/resin-completion.1 +++ b/man/resin-completion.1 @@ -1,4 +1,4 @@ -.TH "RESIN" "1" "May 2015" "" "" +.TH "RESIN" "1" "July 2015" "" "" .SH "NAME" \fBresin\fR \- tab completion for resin .SH DESCRIPTION diff --git a/man/resin-plugins.1 b/man/resin-plugins.1 index f69f2860..e0238d8d 100644 --- a/man/resin-plugins.1 +++ b/man/resin-plugins.1 @@ -1,4 +1,4 @@ -.TH "RESIN\-PLUGINS" "1" "May 2015" "" "" +.TH "RESIN\-PLUGINS" "1" "July 2015" "" "" .SH "NAME" \fBresin-plugins\fR \- Creating Resin CLI plugins .SH DESCRIPTION diff --git a/man/resin.1 b/man/resin.1 index 560d471f..e3c003c2 100644 --- a/man/resin.1 +++ b/man/resin.1 @@ -1,4 +1,4 @@ -.TH "RESIN" "1" "May 2015" "" "" +.TH "RESIN" "1" "July 2015" "" "" .SH "NAME" \fBresin\fR \- command line tool to interact with resin\.io .SH SYNOPSIS diff --git a/package.json b/package.json index 1c562013..c9b0828a 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "resin-register-device": "^1.0.1", "resin-sdk": "^1.7.4", "resin-settings-client": "^1.2.0", - "resin-vcs": "^1.2.0", + "resin-vcs": "^2.0.0", "selfupdate": "^1.1.0", "tmp": "^0.0.25", "underscore.string": "~2.4.0",