dresden-weekly / ansible-rails

flexible Rails deployment with Ansible
MIT License
79 stars 29 forks source link

Worth adding Gemfile.lock to default git export? #25

Open zealot128 opened 9 years ago

zealot128 commented 9 years ago

I've noticed that Gemfile.lock is missing from default git archive command https://github.com/dresden-weekly/ansible-rails/blob/develop/rails/create-release/defaults/main.yml#L19

With a personal app, I just had problems with divergent gem versions production/development. Of course, I can manually add the file to the custom list.

But I think, for most apps it is desired to keep the Gemfile.lock and do not upgrade automatically (AFAIK most apps versions are more relaxed). I know, with Redmine/ multiplatform deployment, you overwrite Gemfile.lock, but I sense, Gemfile.lock would be a good default.

That, or choosing a different strategy than git archiving (like just copying over the archive).

What do you think @arBmind @tnt ?

arBmind commented 9 years ago

I know it's hot discussion. For me Gemfile.lock never worked as intended. Windows will always require different gems. It would be best to use a Heroku like approach:

Bonus would be to scan for mingw/windows platforms and ignore the Gemfile.lock in these cases.

zealot128 commented 9 years ago

Yes, that approach sounds perfect. I guess, people who develop & deploy on different platforms would'nt check in the Gemfile.lock, anyway. But I think, the majority of developers would (or better: should) develop & deploy on similiar platforms.

The "help wanted" label means, I would do it? :)

arBmind commented 9 years ago

Would be really appreciated if you can help one more time. I won't have time before April next year to work on this.