From ebc036d04074cc18663b5c65507151fd04968938 Mon Sep 17 00:00:00 2001 From: Jerome Lacoste Date: Mon, 23 May 2022 13:23:55 +0200 Subject: [PATCH 1/2] Document import_from_gem --- docs/advanced/Fastfile.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/advanced/Fastfile.md b/docs/advanced/Fastfile.md index 142d4b7cb5..8a60a61529 100644 --- a/docs/advanced/Fastfile.md +++ b/docs/advanced/Fastfile.md @@ -114,6 +114,25 @@ end This will also automatically import all the local actions from this repo. + +## `import_from_gem` + +Import from another ruby gem, which you can use to create a single package with common `Fastfile`s and actions for all your projects. + +```ruby +import_from_gem(gem_name: 'my_gem') +# or +import_from_gem(gem_name: 'my_gem', + paths: ['fastlane/Fastfile', 'fastlane/Fastfile_*']) + +lane :new_main_lane do + # ... +end +``` + +This will also automatically import all the local actions from this gem. + + ## Note You should import the other `Fastfile` on the top above your lane declarations. When defining a new lane _fastlane_ will make sure to not run into any name conflicts. If you want to overwrite an existing lane (from the imported one), use the `override_lane` keyword. From e00de1e284e33153ae042f725aa269badeb28664 Mon Sep 17 00:00:00 2001 From: Roger Oba Date: Thu, 18 Jan 2024 21:30:00 -0300 Subject: [PATCH 2/2] Improve formatting and lint changes. --- docs/advanced/Fastfile.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/advanced/Fastfile.md b/docs/advanced/Fastfile.md index 8a60a61529..c9c16ef686 100644 --- a/docs/advanced/Fastfile.md +++ b/docs/advanced/Fastfile.md @@ -114,10 +114,9 @@ end This will also automatically import all the local actions from this repo. - ## `import_from_gem` -Import from another ruby gem, which you can use to create a single package with common `Fastfile`s and actions for all your projects. +Import from another Ruby gem, which you can use to create a single package with common `Fastfile`s and actions for all your projects. ```ruby import_from_gem(gem_name: 'my_gem') @@ -132,7 +131,6 @@ end This will also automatically import all the local actions from this gem. - ## Note You should import the other `Fastfile` on the top above your lane declarations. When defining a new lane _fastlane_ will make sure to not run into any name conflicts. If you want to overwrite an existing lane (from the imported one), use the `override_lane` keyword.