I do have a git repository with a MASTER branch. I have now a new capability into a specific BRANCH of that same git project.
I wish to add the specific branch cordova plugin.
I'm aware of adding a cordova project based on GIT and GIT TAGS but I can't find anything in relation to a branch.
I'm looking for something like :
cordova plugin add https://mygitadresse/myproject#branch_name
Thank for support and suggestion;
If the project's github repository is branched properly, then you should be able to install the plugin using the specific branch in the github out of the box.
cordova plugin add https://git.example.com/myproject#branch_name
Have look at Cordova connect plugin for instance where there is a provision to install versions older than 1.6.0 using sdk_1.3 branch just like the way you wanted. Hope it helps.
If the plugin is not registered at registry.cordova.io
but is located in another git repository, you can specify the git URL:
$ cordova plugin add https://github.com/apache/cordova-plugin-console.git
The git example above fetches the plugin from the end of the master branch, but an alternate git-ref such as a tag or branch can be appended after a #
character:
$ cordova plugin add https://github.com/apache/cordova-plugin-console.git#r0.2.0
If the plugin (and its plugin.xml
file) is in a subdirectory within the git repo, you can specify it with a :
character. Note that the #
character is still needed:
$ cordova plugin add https://github.com/someone/aplugin.git#:/my/sub/dir
You can also combine both the git-ref and the subdirectory:
$ cordova plugin add https://github.com/someone/aplugin.git#r0.0.1:/my/sub/dir
Reference: https://cordova.apache.org/docs/en/3.3.0/guide/cli/index.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With