Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #441 from andrerod/dev

#437: Handling ssh scenario for remotes.
  • Loading branch information...
commit edc4b4020e71e3e51907fd3403f35e2d52f43d09 2 parents 2b96ad0 + 0c8077f
André Rodrigues andrerod authored
2  ChangeLog.txt
View
@@ -1,6 +1,8 @@
2012.10.15 Version 0.6.7
* Adding connection strings support for storage and service bus
* Fixing issue with EMULATED and explicit variables making the later more relevant
+ * Adding Github support
+ * Adding website application settings support
2012.10.12 Version 0.6.6
* Using fixed version of commander.js to avoid bug in commander.js 1.0.5
35 lib/cli/linkedrevisioncontrol.js
View
@@ -75,7 +75,7 @@ function repositoryMatchUri(repository, remoteUri) {
delete cleanUri.auth;
cleanUri = url.format(cleanUri);
- return (((repository.clone_url.toLowerCase() === cleanUri.toLowerCase()) || (repository.html_url.toLowerCase() === cleanUri.toLowerCase())) || (repository.git_url.toLowerCase() === cleanUri.toLowerCase()));};
+ return ((((repository.clone_url.toLowerCase() === cleanUri.toLowerCase()) || (repository.html_url.toLowerCase() === cleanUri.toLowerCase())) || (repository.ssh_url.toLowerCase() === cleanUri.toLowerCase())) || (repository.git_url.toLowerCase() === cleanUri.toLowerCase()));};
@@ -83,7 +83,8 @@ function repositoryMatchUri(repository, remoteUri) {
-LinkedRevisionControlClient.prototype.determineIfCurrentDirectoryIsGitWorkingTree = function LinkedRevisionControlClient_prototype_determineIfCurrentDirectoryIsGitWorkingTree__1(context, _) { var isInsideWorkTree, lines, __this = this; var __frame = { name: "LinkedRevisionControlClient_prototype_determineIfCurrentDirectoryIsGitWorkingTree__1", line: 86 }; return __func(_, this, arguments, LinkedRevisionControlClient_prototype_determineIfCurrentDirectoryIsGitWorkingTree__1, 1, __frame, function __$LinkedRevisionControlClient_prototype_determineIfCurrentDirectoryIsGitWorkingTree__1() {
+
+LinkedRevisionControlClient.prototype.determineIfCurrentDirectoryIsGitWorkingTree = function LinkedRevisionControlClient_prototype_determineIfCurrentDirectoryIsGitWorkingTree__1(context, _) { var isInsideWorkTree, lines, __this = this; var __frame = { name: "LinkedRevisionControlClient_prototype_determineIfCurrentDirectoryIsGitWorkingTree__1", line: 87 }; return __func(_, this, arguments, LinkedRevisionControlClient_prototype_determineIfCurrentDirectoryIsGitWorkingTree__1, 1, __frame, function __$LinkedRevisionControlClient_prototype_determineIfCurrentDirectoryIsGitWorkingTree__1() {
__this.log.silly("determineIfCurrentDirectoryIsGitWorkingTree"); return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$LinkedRevisionControlClient_prototype_determineIfCurrentDirectoryIsGitWorkingTree__1() {
@@ -104,7 +105,7 @@ LinkedRevisionControlClient.prototype.determineIfCurrentDirectoryIsGitWorkingTre
-LinkedRevisionControlClient.prototype.initGitOnCurrentDirectory = function LinkedRevisionControlClient_prototype_initGitOnCurrentDirectory__2(context, scaffold, _) { var __this = this; var __frame = { name: "LinkedRevisionControlClient_prototype_initGitOnCurrentDirectory__2", line: 107 }; return __func(_, this, arguments, LinkedRevisionControlClient_prototype_initGitOnCurrentDirectory__2, 2, __frame, function __$LinkedRevisionControlClient_prototype_initGitOnCurrentDirectory__2() {
+LinkedRevisionControlClient.prototype.initGitOnCurrentDirectory = function LinkedRevisionControlClient_prototype_initGitOnCurrentDirectory__2(context, scaffold, _) { var __this = this; var __frame = { name: "LinkedRevisionControlClient_prototype_initGitOnCurrentDirectory__2", line: 108 }; return __func(_, this, arguments, LinkedRevisionControlClient_prototype_initGitOnCurrentDirectory__2, 2, __frame, function __$LinkedRevisionControlClient_prototype_initGitOnCurrentDirectory__2() {
__this.log.silly("initGitOnCurrentDirectoryIfNeeded");
if (context.flags.isGitWorkingTree) { return _(null); } ;
@@ -136,12 +137,12 @@ function GitClient(cli) {
util.inherits(GitClient, LinkedRevisionControlClient);
-GitClient.prototype.init = function GitClient_prototype_init__3(context, _) { var __this = this; var __frame = { name: "GitClient_prototype_init__3", line: 139 }; return __func(_, this, arguments, GitClient_prototype_init__3, 1, __frame, function __$GitClient_prototype_init__3() {
+GitClient.prototype.init = function GitClient_prototype_init__3(context, _) { var __this = this; var __frame = { name: "GitClient_prototype_init__3", line: 140 }; return __func(_, this, arguments, GitClient_prototype_init__3, 1, __frame, function __$GitClient_prototype_init__3() {
return __this.determineIfCurrentDirectoryIsGitWorkingTree(context, __cb(_, __frame, 1, 2, function __$GitClient_prototype_init__3() {
return __this.initGitOnCurrentDirectory(context, true, __cb(_, __frame, 2, 2, _, true)); }, true)); });};
-GitClient.prototype.deploy = function GitClient_prototype_deploy__4(context, _) { var __frame = { name: "GitClient_prototype_deploy__4", line: 144 }; return __func(_, this, arguments, GitClient_prototype_deploy__4, 1, __frame, _);};
+GitClient.prototype.deploy = function GitClient_prototype_deploy__4(context, _) { var __frame = { name: "GitClient_prototype_deploy__4", line: 145 }; return __func(_, this, arguments, GitClient_prototype_deploy__4, 1, __frame, _);};
@@ -153,7 +154,7 @@ function GithubClient(cli) {
util.inherits(GithubClient, LinkedRevisionControlClient);
-GithubClient.prototype.authenticate = function GithubClient_prototype_authenticate__5(context, _) { var __this = this; var __frame = { name: "GithubClient_prototype_authenticate__5", line: 156 }; return __func(_, this, arguments, GithubClient_prototype_authenticate__5, 1, __frame, function __$GithubClient_prototype_authenticate__5() {
+GithubClient.prototype.authenticate = function GithubClient_prototype_authenticate__5(context, _) { var __this = this; var __frame = { name: "GithubClient_prototype_authenticate__5", line: 157 }; return __func(_, this, arguments, GithubClient_prototype_authenticate__5, 1, __frame, function __$GithubClient_prototype_authenticate__5() {
return __this.ensureCredentials(context, __cb(_, __frame, 1, 2, function __$GithubClient_prototype_authenticate__5() {
__this.client.authenticate({
@@ -163,7 +164,7 @@ GithubClient.prototype.authenticate = function GithubClient_prototype_authentica
-GithubClient.prototype.authenticateAuth = function GithubClient_prototype_authenticateAuth__6(context, _) { var oauthToken, __this = this; var __frame = { name: "GithubClient_prototype_authenticateAuth__6", line: 166 }; return __func(_, this, arguments, GithubClient_prototype_authenticateAuth__6, 1, __frame, function __$GithubClient_prototype_authenticateAuth__6() {
+GithubClient.prototype.authenticateAuth = function GithubClient_prototype_authenticateAuth__6(context, _) { var oauthToken, __this = this; var __frame = { name: "GithubClient_prototype_authenticateAuth__6", line: 167 }; return __func(_, this, arguments, GithubClient_prototype_authenticateAuth__6, 1, __frame, function __$GithubClient_prototype_authenticateAuth__6() {
return __this.ensureCredentials(context, __cb(_, __frame, 1, 2, function __$GithubClient_prototype_authenticateAuth__6() {
__this.client.authenticate({
@@ -180,7 +181,7 @@ GithubClient.prototype.authenticateAuth = function GithubClient_prototype_authen
-GithubClient.prototype.ensureCredentials = function GithubClient_prototype_ensureCredentials__7(context, _) { var __this = this; var __frame = { name: "GithubClient_prototype_ensureCredentials__7", line: 183 }; return __func(_, this, arguments, GithubClient_prototype_ensureCredentials__7, 1, __frame, function __$GithubClient_prototype_ensureCredentials__7() {
+GithubClient.prototype.ensureCredentials = function GithubClient_prototype_ensureCredentials__7(context, _) { var __this = this; var __frame = { name: "GithubClient_prototype_ensureCredentials__7", line: 184 }; return __func(_, this, arguments, GithubClient_prototype_ensureCredentials__7, 1, __frame, function __$GithubClient_prototype_ensureCredentials__7() {
if (!context.github) {
context.github = { }; } ;
@@ -198,7 +199,7 @@ GithubClient.prototype.ensureCredentials = function GithubClient_prototype_ensur
-GithubClient.prototype.init = function GithubClient_prototype_init__8(context, _) { var repositories, remoteUris, __this = this; var __frame = { name: "GithubClient_prototype_init__8", line: 201 }; return __func(_, this, arguments, GithubClient_prototype_init__8, 1, __frame, function __$GithubClient_prototype_init__8() {
+GithubClient.prototype.init = function GithubClient_prototype_init__8(context, _) { var repositories, remoteUris, __this = this; var __frame = { name: "GithubClient_prototype_init__8", line: 202 }; return __func(_, this, arguments, GithubClient_prototype_init__8, 1, __frame, function __$GithubClient_prototype_init__8() {
return __this.authenticate(context, __cb(_, __frame, 1, 2, function __$GithubClient_prototype_init__8() {
@@ -241,7 +242,7 @@ GithubClient.prototype.init = function GithubClient_prototype_init__8(context, _
-GithubClient.prototype.deploy = function GithubClient_prototype_deploy__9(context, _) { var __frame = { name: "GithubClient_prototype_deploy__9", line: 244 }; return __func(_, this, arguments, GithubClient_prototype_deploy__9, 1, __frame, function __$GithubClient_prototype_deploy__9() {
+GithubClient.prototype.deploy = function GithubClient_prototype_deploy__9(context, _) { var __frame = { name: "GithubClient_prototype_deploy__9", line: 245 }; return __func(_, this, arguments, GithubClient_prototype_deploy__9, 1, __frame, function __$GithubClient_prototype_deploy__9() {
return context.lvcClient.createOrUpdateHook(context.github.repository.owner.login, context.github.repository.name, context.repositoryUri, context.repositoryAuth, __cb(_, __frame, 2, 2, _, true)); });};
@@ -260,7 +261,7 @@ GithubClient.prototype.getRepositories = function GithubClient_prototype_getRepo
function filterPrivate(repository) {
- return (repository["private"] !== true); }; var __frame = { name: "GithubClient_prototype_getRepositories__10", line: 253 }; return __func(_, this, arguments, GithubClient_prototype_getRepositories__10, 1, __frame, function __$GithubClient_prototype_getRepositories__10() { progress = __this.cli.progress("Retrieving repositories"); userRepos = []; return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$GithubClient_prototype_getRepositories__10() {
+ return (repository["private"] !== true); }; var __frame = { name: "GithubClient_prototype_getRepositories__10", line: 254 }; return __func(_, this, arguments, GithubClient_prototype_getRepositories__10, 1, __frame, function __$GithubClient_prototype_getRepositories__10() { progress = __this.cli.progress("Retrieving repositories"); userRepos = []; return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$GithubClient_prototype_getRepositories__10() {
@@ -292,7 +293,7 @@ GithubClient.prototype.getRepositories = function GithubClient_prototype_getRepo
return _(null, userRepos); }); }); });};
-GithubClient.prototype.createOrUpdateHook = function GithubClient_prototype_createOrUpdateHook__11(username, repository, websitesRepositoryUri, websitesRepositoryAuth, _) { var parsedRepositoryUri, deployUri, hooks, existingHook, newHook, __this = this; var __frame = { name: "GithubClient_prototype_createOrUpdateHook__11", line: 295 }; return __func(_, this, arguments, GithubClient_prototype_createOrUpdateHook__11, 4, __frame, function __$GithubClient_prototype_createOrUpdateHook__11() {
+GithubClient.prototype.createOrUpdateHook = function GithubClient_prototype_createOrUpdateHook__11(username, repository, websitesRepositoryUri, websitesRepositoryAuth, _) { var parsedRepositoryUri, deployUri, hooks, existingHook, newHook, __this = this; var __frame = { name: "GithubClient_prototype_createOrUpdateHook__11", line: 296 }; return __func(_, this, arguments, GithubClient_prototype_createOrUpdateHook__11, 4, __frame, function __$GithubClient_prototype_createOrUpdateHook__11() {
parsedRepositoryUri = url.parse(websitesRepositoryUri);
parsedRepositoryUri.auth = websitesRepositoryAuth;
@@ -349,7 +350,7 @@ GithubClient.prototype.createOrUpdateHook = function GithubClient_prototype_crea
-GithubClient.prototype.createHook = function GithubClient_prototype_createHook__12(hook, _) { var progress, __this = this; var __frame = { name: "GithubClient_prototype_createHook__12", line: 352 }; return __func(_, this, arguments, GithubClient_prototype_createHook__12, 1, __frame, function __$GithubClient_prototype_createHook__12() {
+GithubClient.prototype.createHook = function GithubClient_prototype_createHook__12(hook, _) { var progress, __this = this; var __frame = { name: "GithubClient_prototype_createHook__12", line: 353 }; return __func(_, this, arguments, GithubClient_prototype_createHook__12, 1, __frame, function __$GithubClient_prototype_createHook__12() {
progress = __this.cli.progress("Creating new hook"); return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$GithubClient_prototype_createHook__12() {
@@ -359,7 +360,7 @@ GithubClient.prototype.createHook = function GithubClient_prototype_createHook__
-GithubClient.prototype.updateHook = function GithubClient_prototype_updateHook__13(hook, _) { var progress, __this = this; var __frame = { name: "GithubClient_prototype_updateHook__13", line: 362 }; return __func(_, this, arguments, GithubClient_prototype_updateHook__13, 1, __frame, function __$GithubClient_prototype_updateHook__13() {
+GithubClient.prototype.updateHook = function GithubClient_prototype_updateHook__13(hook, _) { var progress, __this = this; var __frame = { name: "GithubClient_prototype_updateHook__13", line: 363 }; return __func(_, this, arguments, GithubClient_prototype_updateHook__13, 1, __frame, function __$GithubClient_prototype_updateHook__13() {
progress = __this.cli.progress("Updating hook"); return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$GithubClient_prototype_updateHook__13() {
@@ -369,7 +370,7 @@ GithubClient.prototype.updateHook = function GithubClient_prototype_updateHook__
-GithubClient.prototype.testHook = function GithubClient_prototype_testHook__14(hook, _) { var progress, __this = this; var __frame = { name: "GithubClient_prototype_testHook__14", line: 372 }; return __func(_, this, arguments, GithubClient_prototype_testHook__14, 1, __frame, function __$GithubClient_prototype_testHook__14() {
+GithubClient.prototype.testHook = function GithubClient_prototype_testHook__14(hook, _) { var progress, __this = this; var __frame = { name: "GithubClient_prototype_testHook__14", line: 373 }; return __func(_, this, arguments, GithubClient_prototype_testHook__14, 1, __frame, function __$GithubClient_prototype_testHook__14() {
progress = __this.cli.progress("Testing hook"); return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$GithubClient_prototype_testHook__14() {
@@ -379,7 +380,7 @@ GithubClient.prototype.testHook = function GithubClient_prototype_testHook__14(h
-GithubClient.prototype.getHooks = function GithubClient_prototype_getHooks__15(username, repository, _) { var progress, __this = this; var __frame = { name: "GithubClient_prototype_getHooks__15", line: 382 }; return __func(_, this, arguments, GithubClient_prototype_getHooks__15, 2, __frame, function __$GithubClient_prototype_getHooks__15() {
+GithubClient.prototype.getHooks = function GithubClient_prototype_getHooks__15(username, repository, _) { var progress, __this = this; var __frame = { name: "GithubClient_prototype_getHooks__15", line: 383 }; return __func(_, this, arguments, GithubClient_prototype_getHooks__15, 2, __frame, function __$GithubClient_prototype_getHooks__15() {
progress = __this.cli.progress("Retrieving website hooks"); return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$GithubClient_prototype_getHooks__15() {
@@ -392,7 +393,7 @@ GithubClient.prototype.getHooks = function GithubClient_prototype_getHooks__15(u
-GithubClient.prototype._getRemoteUris = function GithubClient_prototype__getRemoteUris__16(_) { var progress, remoteUris, remotes, __this = this; var __frame = { name: "GithubClient_prototype__getRemoteUris__16", line: 395 }; return __func(_, this, arguments, GithubClient_prototype__getRemoteUris__16, 0, __frame, function __$GithubClient_prototype__getRemoteUris__16() {
+GithubClient.prototype._getRemoteUris = function GithubClient_prototype__getRemoteUris__16(_) { var progress, remoteUris, remotes, __this = this; var __frame = { name: "GithubClient_prototype__getRemoteUris__16", line: 396 }; return __func(_, this, arguments, GithubClient_prototype__getRemoteUris__16, 0, __frame, function __$GithubClient_prototype__getRemoteUris__16() {
progress = __this.cli.progress("Retrieving local git repositories");
remoteUris = []; return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$GithubClient_prototype__getRemoteUris__16() {
1  lib/cli/linkedrevisioncontrol_.js
View
@@ -77,6 +77,7 @@ function repositoryMatchUri (repository, remoteUri) {
return repository.clone_url.toLowerCase() === cleanUri.toLowerCase()
|| repository.html_url.toLowerCase() === cleanUri.toLowerCase()
+ || repository.ssh_url.toLowerCase() === cleanUri.toLowerCase()
|| repository.git_url.toLowerCase() === cleanUri.toLowerCase();
}
Please sign in to comment.
Something went wrong with that request. Please try again.