[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] import from gem action #20294

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

lacostej
Copy link
Collaborator

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

This builds on top of #20293

We wish to replace import_from_git with this new action to use gem files to package the shared Fastfile and its dependencies. Together with the transitive dependencies it simplifies the use of a shared Fastfile.

We modify our repository containing our shared Gemfile by

  • replacing our shared repo's Gemfile by a gemspec
  • moving all Plugins into the gemspec file
  • replacing the fastlane_version "x.y.z" in the shared Fastfile with a proper version constraint in the gemspec. For consumer projects, bundler will resolve the right dependency when needed

For our consumer projects this gives the following results:

  • the project's gemfile contains a single dependency to the shared Gem (instead of one
gem 'name_of_gem', git: 'URL_GIT_REPO'
  • we remove from the Pluginfile all dependencies now managed by bundler
  • we replace our Fastfile import from
import_from_git(url: "URL_GIT_REPO", dependencies: [...])

to

import_from_gem(gem_name: "name_of_gem")

Extra benefits: builds are now reproducible. Updating the shared fastfile requires doing an update in the corresponding user projects.

I am opening this for discussion and can clean the code, add tests as needed.

Who can provide some feedback on this? @joshdholtz maybe?

Description

Testing Steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants