Skip to content

Commit 41da207

Browse files
authored
Merge pull request #261 from BranchMetrics/fix_plugin_install_from_config_xml
fix: [v3.0.0] install Branch SDK from config.xml
2 parents 7f01f61 + da61e06 commit 41da207

File tree

169 files changed

+2463
-5236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+2463
-5236
lines changed

.eslintrc

Lines changed: 0 additions & 17 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
testbed/platforms
33
testbed/plugins
44
testbed/hooks
5+
testbed/build.json
56
node_modules
67
.installed
78
.gradle/
@@ -10,5 +11,5 @@ cordova-ionic-phonegap-branch-deep-linking.iml
1011
local.properties
1112
out/
1213
src/cordova-ionic-phonegap-branch-deep-linking.iml
13-
npm-debug.log
14+
npm-debug.log*
1415
*.map

.jscsrc

Lines changed: 0 additions & 40 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 102 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,117 @@
1-
# Development Conventions
1+
# Developing the SDK Locally
2+
*Questions? [Contact us](https://support.branch.io/support/tickets/new)*
23

3-
This document outlines our development processes.
4+
1. [Dependencies](#dependencies)
5+
1. [SDK](#sdk)
6+
1. [Develop](#develop)
7+
1. [Validate](#validate)
8+
1. [Test](#test)
9+
1. [Submit](#submit)
410

5-
## ES6
11+
#
612

7-
Source code for all .js files in this project is written in es6 and then compiled via babel to es5. Unfortunately, for legacy reasons, the es5 needs to be stored in version control. As such, if you want to change a js file, edit the version in the corresponding .es6 directory, compile it with the `gulp babel` command, and then commit it as well as the resulting .js file.
13+
### Dependencies
814

9-
## Pull Requests
15+
> Homebrew
1016
11-
All changes to this project should be made in the form of pull requests against master. Use snake-case prefixed by 'feat/' or 'fix/' for features/fixes. Feel free to use any of the commit types listed [here](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#type) as well. Note that when pull requests are merged in they will be automatically released to npm by (Travis CI)[https://travis-ci.org/] and (semantic-release)[https://github.com/semantic-release/semantic-release] so make sure to fully test.
17+
```sh
18+
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
19+
brew update;
20+
brew doctor;
21+
export PATH="/usr/local/bin:$PATH";
22+
```
23+
24+
> Node
1225
13-
## Commit Messages
26+
```sh
27+
brew install node;
28+
```
1429

15-
Please format your commit messages to match [Angular's Conventions](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#-git-commit-guidelines). These messages are parsed using semantic release to determine version numbers so it is important that you stick to them exactly. We recommend using the `npm run commit` script installed in this project to draft conformant messages.
30+
> Gulp
1631
17-
## Linting
32+
```sh
33+
npm install -g gulp-cli;
34+
```
1835

19-
The style of all js files in this project are strictly checked using [jscs](http://jscs.info/) and [eslint](http://eslint.org/) before any pull request/release is made. You can manually check your local clone using the `gulp lint` command (don't forget to `npm install -g gulp` if you haven't already). Many problems can be automatically fixed by `gulp jscs-fix`. Don't forget to commit before running jscs-fix in case you end up needing to back out changes.
36+
### SDK
2037

21-
## Testing
38+
> Local
39+
40+
```sh
41+
git clone [email protected]:BranchMetrics/cordova-ionic-phonegap-branch-deep-linking.git;
42+
cd cordova-ionic-phonegap-branch-deep-linking;
43+
rm -rf node_modules;
44+
npm install --save-dev;
45+
```
2246

23-
See [tests-harness/README.md](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/master/tests-harness/README.md) for details on how to run this project's test suite. Please run the test suite before merging any branches.
47+
### Develop
2448

25-
## Updating IOS dependencies
49+
> Build
2650
27-
This project depends on [ios-branch-deep-linking](https://github.com/BranchMetrics/ios-branch-deep-linking). To upgrade that dependency a [release](https://github.com/BranchMetrics/ios-branch-deep-linking/releases) of it run the following script:
51+
```sh
52+
gulp prerelease;
53+
```
54+
55+
> **[optional]** Update [iOS SDK](https://github.com/BranchMetrics/ios-branch-deep-linking/tags) (will need to update `plugin.xml` dependencies if new iOS files)
56+
57+
```sh
58+
./src/ios/dependencies/update.sh 0.12.20;
59+
```
60+
61+
### Test
62+
63+
> Modify `BRANCH_KEY` and `URI_SCHEME` and `config.xml` to values in [Branch Dashboard](https://dashboard.branch.io/settings/link)
64+
65+
```sh
66+
gulp prerelease; cd testbed; npm install -g cordova; cordova platform remove ios; cordova platform remove android; cordova platform remove browser; cordova platform add ios; cordova platform add android; cordova plugin remove branch-cordova-sdk; cordova plugin add ../ --variable BRANCH_KEY=key_live_icCccJIpd7GlYY5oOmoEtpafuDiuyXhT --variable URI_SCHEME=enefftest;
67+
68+
gulp prod;
69+
cd testbed;
70+
npm uninstall mkpath node-version-compare plist xml2js;
71+
rm -rf ../.installed;
72+
rm -rf ./plugins;
73+
rm -rf ./platforms;
74+
cordova platform add ios;
75+
cordova plugin add ../;
76+
cordova build ios --developmentTeam="PW4Q8885U7";
77+
open -a Xcode platforms/ios/Branch\ Testing.xcworkspace;
78+
79+
```
80+
81+
> Validate all features on both `iOS` and `Android` on `device` only (no `simulator` or `TestFlight`)
2882
29-
```shell
30-
# <tag> is the name of the release. e,g, '0.12.5'
31-
$ src/ios/dependencies/update.sh <tag>
83+
```sh
84+
cordova build ios --developmentTeam="PW4Q8885U7"; open -a Xcode platforms/ios/Branch\ Testing.xcworkspace;
3285
```
86+
87+
```sh
88+
cordova build android; cordova run android;
89+
chrome://inspect/#devices
90+
```
91+
92+
> Test harnesses `TODO`
93+
94+
### Submit
95+
96+
> **Required** [Semantic Release](https://github.com/semantic-release/semantic-release) comments `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`, `revert`
97+
98+
> Submit code with a [pull request](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking)
99+
100+
```sh
101+
git checkout -b BRANCH_NAME;
102+
git add FILE_NAME;
103+
npm run commit;
104+
git push origin BRANCH_NAME;
105+
```
106+
107+
### Publish
108+
109+
> Update `CHANGELOG.md`
110+
> Update version within plugin.template.xml
111+
> Run `gulp prerelease`
112+
> Merge Pull Request - code to NPM will happen automatically
113+
114+
115+
## Hooks
116+
117+
Don't need to `rebuild.sh`, just re-run `cordova build ios`

DEVELOPING.md

Lines changed: 0 additions & 111 deletions
This file was deleted.

ISSUE_TEMPLATE

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)