Code push is great! Fastlane is also great! Is there a fastlane action for Codepush? If not, would you folks be able to create a simple one?
Sounds like a perfect marriage. But does it make sense though? Fastlane is for deploying to app stores. Codepush is for bypassing the app stores, and push JS code updates directly to already installed apps.
Since commenting here I wrote a barebones version, which I can link to tomorrow (let me know if you'd like this). I agree with what you said, I'm using it to have nice defaults and to do things like auto-generate changelogs from git commits.
That is a good use case. Where does your changelogs go though if through code push, inside the app as a modal?
@fungilation I think an in-app modal would be a good use case, though I think we only use it for internal record keeping. I also remembered that fastlane does things like extract your binary version from the configs, so you don't have to keep track of which binary version you want to target. You can also run test suites and stop deployment if they fail, etc. I'm not entirely convinced it's the right tool for the job, but fastlane has so many nice bookkeeping utilities (and a nice UI) that I figure why not give it a shot.
Here's a v0: https://github.com/j2kun/fastlane-codepush
Here's an example of how it would be used in a Fastfile:
desc "Codepush to staging server (employees only)"
lane :codepush_staging do |options|
dry_run = options.has_key?("dry_run")
version = Actions.lane_context[SharedValues::VERSION_NUMBER]
description = changelog_from_git_commits(merge_commit_filtering: "exclude_merges") # last tag until HEAD
codepush(
dry_run: dry_run,
app_name: 'FooBar',
target_binary_version: version,
deployment: 'Staging',
description: description, # additional options go here as desired
)
end
Not sure what the right next step is. Maybe you folks could give it a look over to make sure it doesn't violate the codepush ethos, and then I can ask the fastlane folks to incorporate it as a natively supported action?
Apologies, I don't contribute to open source very often, certainly never a plugin that spans multiple projects.
Paging @panarasi - should he ask Fastlane to incorporate this natively?
My personal thoughts are that we would be okay with this, but we may not be able to provide any special support for it.
FWIW, since it's just a CLI wrapper, I think the fastlane folks would be able to maintain it just fine, should they decide to incorporate it.
+1 As I was just looking for this today. Use case is clear for me: I need to push native update via fastlane only once in a while when I add native modules. The rest of the time, I use code push to update the JS bundle only. At the moment, there's a clear pain as most of the time I release code-push before or after the fastlane beta, and it's not easy to prevent the new beta to automatically update to the code-push version. Clearly, the bundle generated during the fastlane release should ideally be pushed to code-push.
I think we should close this issue here and have documentation in CodePush linking to the Fastlane action.
Btw, we are also working on integrating CodePush with Mobile Center - it would have a similar experience.
if anyone is interested in using codepush for react native app's in fastlane we've created out of business needs a plugin under:https://github.com/manuelkch/fastlane-plugin-code_push. Feel free to participate or ask for features
Closing this issue since we are already working on CodePush and Mobile Center integration.
Most helpful comment
if anyone is interested in using codepush for react native app's in fastlane we've created out of business needs a plugin under:https://github.com/manuelkch/fastlane-plugin-code_push. Feel free to participate or ask for features