Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Commit 8486142

Browse files
committed
Improvements to examples and docs
1 parent 911927f commit 8486142

File tree

3 files changed

+58
-14
lines changed

3 files changed

+58
-14
lines changed

README.md

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,17 +166,60 @@ the project must also match the value of this parameter without regard to order.
166166

167167
This action does not use the Branchfile.
168168

169-
## Example
169+
## Examples
170170

171-
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. To try it:
171+
There is an example [Fastfile](./fastlane/Fastfile) in this repo that defines a number of
172+
example lanes. Be sure to run `bundle install` before trying any of the examples.
173+
174+
### setup
175+
176+
This lane sets up the BranchPluginExample projects
177+
in [examples/android/BranchPluginExample](./examples/android/BranchPluginExample) and
178+
[examples/ios/BranchPluginExample](./examples/ios/BranchPluginExample).
179+
The Xcode project uses CocoaPods and Swift.
180+
181+
```bash
182+
bundle exec fastlane setup
183+
```
184+
185+
### setup_and_commit
186+
187+
This lane sets up the BranchPluginExample projects and also commits the results to git.
188+
189+
```bash
190+
bundle exec fastlane setup
191+
```
192+
193+
### setup_objc
194+
195+
This lane sets up the BranchPluginExampleObjc project
196+
in [examples/ios/BranchPluginExampleObjc](./examples/ios/BranchPluginExampleObjc).
197+
The project uses CocoaPods and Objective-C.
172198

173199
```bash
174-
bundle exec fastlane validate # The example project needs to be set up. This will fail.
175-
bundle exec fastlane setup # Also validates the UL configuration.
176-
bundle exec fastlane setup_and_commit # Also commit changes to Git. (git reset --hard HEAD^ to erase the last commit)
177-
bundle exec fastlane validate # Now validation will pass.
200+
bundle exec fastlane setup_objc
178201
```
179202

203+
### setup_carthage
204+
205+
This lane sets up the BranchPluginExampleCarthage project
206+
in [examples/ios/BranchPluginExampleCarthage](./examples/ios/BranchPluginExampleCarthage).
207+
The project uses Carthage and Swift.
208+
209+
```bash
210+
bundle exec fastlane setup_carthage
211+
```
212+
213+
### validate
214+
215+
This lane validates the Universal Link configuration for the BranchPluginExample
216+
project in [examples/ios/BranchPluginExample](./examples/ios/BranchPluginExample).
217+
218+
```bash
219+
bundle exec fastlane validate
220+
```
221+
222+
180223
## Run tests for this plugin
181224

182225
To run both the tests, and code style validation, run

fastlane/Branchfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@
33
live_key "key_live_dczvWn3zrK8575YRe07IgjblAAmfx51S"
44
test_key "key_test_fbqC9k2BqS68Y1XQi7YVjakhCxomD6Z9"
55
app_link_subdomain "wujv"
6-
android_project_path "examples/android/BranchPluginExample"
7-
xcodeproj "examples/ios/BranchPluginExample/BranchPluginExample.xcodeproj"
86
frameworks %w{AdSupport CoreSpotlight SafariServices}

fastlane/Fastfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
desc "Add Branch keys and Universal Link domains to BranchPluginExample"
1+
desc "Set up BranchPluginExample"
22
lane :setup do
3-
setup_branch
3+
setup_branch android_project_path: "examples/android/BranchPluginExample",
4+
xcodeproj: "examples/ios/BranchPluginExample/BranchPluginExample.xcodeproj"
45
end
56

6-
desc "Add Branch keys and Universal Link domains to BranchPluginExample and commit to Git"
7+
desc "Set up BranchPluginExample and commit to Git"
78
lane :setup_and_commit do
8-
setup_branch commit: true # Use a string here for a custom commit message
9+
setup_branch android_project_path: "examples/android/BranchPluginExample",
10+
xcodeproj: "examples/ios/BranchPluginExample/BranchPluginExample.xcodeproj",
11+
commit: true # Use a string here for a custom commit message
912
end
1013

11-
desc "Set up the BranchPluginExampleObjc"
14+
desc "Set up BranchPluginExampleObjc"
1215
lane :setup_objc do
1316
setup_branch xcodeproj: "examples/ios/BranchPluginExampleObjc/BranchPluginExampleObjc.xcodeproj"
1417
end
1518

16-
desc "Set up the BranchPluginExampleCarthage"
19+
desc "Set up BranchPluginExampleCarthage"
1720
lane :setup_carthage do
1821
setup_branch xcodeproj: "examples/ios/BranchPluginExampleCarthage/BranchPluginExampleCarthage.xcodeproj"
1922
end

0 commit comments

Comments
 (0)