Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importing and calling platform-specific lanes from general platform in Fastlane

I have a react-native app, with both ios and android directories inside a common directory. I want to be able to release (execute a lane) iOS or Android independently, so I setup fastlane init in each of the platform dirs (which created two fastlane/Fastfile in each platform dir). Android Fastfile roughly contains:

platform :android do
  lane: release_android do
    ...
  end

AND iOS:

platform :ios do
  lane: release_ios do
    ...
  end

Now I also manually created a fastlane/Fastfile file in the common containing dir that looks like this:

import '../ios/fastlane/Fastfile'
import '../android/fastlane/Fastfile'

lane :release_all do
  release_android
  release_ios
end

However, when I run fastlane release_all from the main dir, it breaks with Could not find action or lane 'release_android'.

Any idea what I'm doing wrong here? Could it not be possible to call a platform-specific lane from a general lane?

Environment

fastlane 1.96.0

like image 506
mllm Avatar asked Jun 28 '16 20:06

mllm


1 Answers

This isn't the ideal solution as it ends up wrapping your lane execution in another lane but we do this in your equivalent to release_all, however I wonder if it would allow running those in parallel:

sh "fastlane ios beta"
sh "fastlane android beta"
like image 158
Chris LeBlanc Avatar answered Sep 22 '22 15:09

Chris LeBlanc