Conversation
|
Yes, this is very tempting but there are many problems with this approach.
Any reason you crossed that? It doesn't work maybe?
IMHO not having the Gemfile/gemspec in the repo is a big hurdle for contributors and gem standards. If you generate those, then generate them whenever something changes, and have a check in CI they are up to date (by generating them and checking there is no diff). |
I was hoping to document this in the README, if the proposal was merge-worthy. The idea was to instruct users to write a shell script to run multiple commands and execute the shell script via the provided hook.. steps:
- uses: ruby/setup-ruby@v1
with:
post-ruby-install: bash .github/workflows/scripts/my_script
The hook was implemented to run only if Bundler was going to be consequently installed.
I agree with you. This was actually for a repository that was started in the Ruby 1.8 era (and still under maintenance), that I contribute to. The repo had used TravisCI in the past relying on the CI's @eregon Thank you for taking a look at my proposal. |
|
I forgot to mention in my first reply. A general solution for this would be to extract a separate action to do the bundler caching.
That's a good idea, just accept a single command and tell users to use a shell script for anything more complex.
Oh right, I hate this behavior, the command is asking to update RubyGems, not Bundler, Bundler shouldn't get installed (especially in a weird place where it cannot be uninstalled). I'll think a bit more about this. |
I did consider this option though but given that even
Thank you very much :) |
|
After thinking about it for a while, I think this is not worth the potential complications it brings. |
Motivation
Currently, if one is using this action to set up Ruby and manage caching of their gemset, there is no way to *micro-manage * the environment before Bundler gets installed and consequently executing
bundle install.With this hook, the end-user will be able to:
change the Rubygems version if needed, orrakegem manually and invoke Rake task(s) that sets up the project's Gemfile / Gemspec for consequent consumption by Bundler.P.S. I did not generate the
dist/index.jsbecause I'm on Windows and the generation process is altering the line-endings.