[
https://issues.apache.org/jira/browse/CB-8239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14276159#comment-14276159
]
ASF GitHub Bot commented on CB-8239:
------------------------------------
Github user omefire commented on a diff in the pull request:
https://github.com/apache/cordova-lib/pull/148#discussion_r22904360
--- Diff: cordova-lib/spec-cordova/platform.spec.js ---
@@ -354,22 +359,94 @@ describe('add function', function () {
});
});
- it('fails if there is an error while getting the platform details',
function (done) {
+ it('tries to git-clone if there is an error while getting the platform
details as specified from the command line', function (done) {
- var targets = ['C:\\Projects\\cordova-projects\\cordova-android'];
+ var targets = ['https://github.com/apache/cordova-android'],
+ targetPlatform = 'android',
+ libDir =
'C:\\Projects\\cordova-projects\\cordova-android-clone-directory';
+
+ var cloneGitRepoMock = jasmine.createSpy().andReturn(Q({
+ platform: targetPlatform,
+ libDir: libDir
+ }));
+ platform.__set__('cloneGitRepo', cloneGitRepoMock);
--- End diff --
@jsoref , why do I still need a PR to update
https://github.com/apache/cordova-cli/blob/38dd67242841dd2ec254f7f9f402f495f7a28f5b/doc/platform.txt#L20
?
It seems like the file already refers to <url>s
> Add support for git urls to 'cordova platform add'
> --------------------------------------------------
>
> Key: CB-8239
> URL: https://issues.apache.org/jira/browse/CB-8239
> Project: Apache Cordova
> Issue Type: New Feature
> Components: CLI, CordovaLib
> Reporter: Omar Mefire
>
> Allow the following scenarios:
> - users can issue 'cordova platform add
> https://github.com/apache/cordova-android.git' and the git repo will be
> cloned and used.
> - users can issue 'cordova platform add
> android@https://github.com/apache/cordova-android.git' and the git repo will
> be cloned and used.
> - users can issue 'cordova platform add android' and if their config.xml file
> contains: '<engine id='android'
> version='https://github.com/apache/cordova-android.git' />, then the git repo
> pointed to by config.xml will be cloned and used.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]