Fastlane CodePush plugin
Getting Started
This project is a fastlane plugin. To get started with fastlane-plugin-codepush, add it to your project by running:
fastlane add_plugin codepush
About codepush
This is a Fastlane plugin for App Center CodePush service.
List of available actions
1. codepush_login
Log in to App Center to access CodePush service.
codepush_login
| Key | Description | Environment Variable | Default |
|---|---|---|---|
| login_token | App center login token to access CodePush service, optional if ENV['APP_CENTER_LOGIN_TOKEN'] is set | APP_CENTER_LOGIN_TOKEN | |
| enforce | Enforce logout before login | false |
2. codepush_logout
codepush_logout
3. codepush_release_react
CodePush release-react action
This action lets you release React Native Javascript bundles to a specific CodePush deployment.
codepush_release_react(
app_name: "pharekar/MyAwesomeApp",
disable_duplicate_release_error: true
)
| Action | Description | Environment Variable | Default |
|---|---|---|---|
| app_name | Name of the App Center app, optional if ENV['APP_CENTER_APP_NAME'] is set | APP_CENTER_APP_NAME | |
| execution_dir_path | Release React CLI command execution dir path | ./ | |
| target_binary_version | Store/binary version of the app you are releasing the update for | "*" | |
| deployment_name | Name of your deployment | Staging | |
| output_dir | Output directory | ||
| sourcemap_output | Relative path to where the generated JS bundle's source map file should be written | ||
| plist_file_prefix | File name prefix of the Info.plist file | ||
| plist_file | (iOS) Relative path to the Info.plist file | ||
| gradle_file | (Android) Relative path to the build.gradle file | ||
| description | An optional change log for the deployment | ||
| mandatory | Specify whether the update should be considered mandatory or not | false | |
| disabled | Specify whether the update should be downloadable by end users or not | false | |
| rollout_percentage | Percentage of users that should be eligible to receive this update | ||
| disable_duplicate_release_error | Specify whether duplicate release error should be disabled or not | false | |
| disable_telemetry | Specify whether telemetry should be disabled or not | false | |
| version | Version | ||
| private_key_path | Relative path to private key | ||
| entry_file | Relative path to the app's root/entry JavaScript file | ||
| development | Specify whether to generate an unminified, development JS bundle | ||
| bundle_name | File name that should be used for the generated JS bundle | ||
| dry_run | Print the command that would be run, and don't run it | false |
3. codepush_promote
CodePush promote deployment action
This action lets you promote updates from a source deployment to a destination deployment.
codepush_promote(
app_name: "pharekar/MyAwesomeApp",
source_deployment_name: "Staging",
destination_deployment_name: "Production",
)
| Action | Description | Environment Variable | Default |
|---|---|---|---|
| app_name | Name of the App Center app, optional if ENV['APP_CENTER_APP_NAME'] is set | APP_CENTER_APP_NAME | |
| execution_dir_path | Promote CLI command execution dir path | ./ | |
| target_binary_version | Store/binary version of the app you are releasing the update for | "*" | |
| source_deployment_name | Source deployment name | ||
| destination_deployment_name | Destination deployment name | ||
| description | An optional change log for the deployment | ||
| rollout_percentage | Percentage of users that should be eligible to receive this update | ||
| disable_duplicate_release_error | Specify whether duplicate release error should be disabled or not | false | |
| disable_telemetry | Specify whether telemetry should be disabled or not | false | |
| dry_run | Print the command that would be run, and don't run it | false |
Example
Check out the example Fastfile to see how to use this plugin.
Run tests for this plugin
To run both the tests, and code style validation, run
rake
To automatically fix many of the styling issues, use
rubocop -a
Issues and Feedback
For any other issues and feedback about this plugin, please submit it to this repository. Feel free to submit pull requests and improve test coverage.
Troubleshooting
If you have trouble using plugins, check out the Plugins Troubleshooting guide.
Using fastlane Plugins
For more information about how the fastlane plugin system works, check out the Plugins documentation.
About fastlane
fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.