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
Unify changelog handling for rubygems & bundler #3848
Conversation
d16e5c3
to
9c47e7e
Compare
9c47e7e
to
bd62a81
Compare
We're using whatever `rake` comes with ruby anyways when we run `rake setup` in CI or our local machine. So let's not lock `rake`.
Since our changelog is generated only at release time, and not after each PR, it doesn't make sense to keep an "Unreleased" section.
It's UTF-8 by default these days.
It's more handy if we always deal with arrays of lines inside.
The target release can be inferred.
So that it can replace the `util/update_changelog.rb` script.
So that they can be used for any target version.
bd62a81
to
6b382f4
Compare
I'm reasonably happy with this as a first version now. Automatic changelog management is now integrated in both rubygems & bundler. Release scripts now automatically generate the changelog including all merged but unreleased PRs since the latest release that make sense according to the "release level". I chose the following mapping for this (and the equivalent for bundler): Lines 23 to 34 in 6b382f4
That means:
Additionally, I created +=== 3.2.0.rc.2 / 2020-09-15
+
+Minor enhancements:
+
+* Make --dry-run flag consistent across rubygems commands. Pull request
+ #3867 by bronzdoc
+
+Bug fixes:
+
+* Make `--default` and `--install-dir` options to `gem install` play nice
+ together. Pull request #3906 by deivid-rodriguez
+* Add missing fileutils require. Pull request #3911 by deivid-rodriguez
+* Fix false positive warning on Windows when PATH has
+ `File::ALT_SEPARATOR`. Pull request #3829 by deivid-rodriguez
+* `gem install --user` fails with `Gem::FilePermissionError` on the system
+ plugins directory. Pull request #3804 by nobu
+
+Performance:
+
+* Avoid duplicated generation of APISpecification objects. Pull request
+ #3940 by mame
+* Eval defaults with frozen_string_literal: true. Pull request #3847 by
+ casperisfine
+* Deduplicate the requirement operators in memory. Pull request #3846 by
+ casperisfine Similarly, running +# 2.2.0.rc.2 (September 15, 2020)
+
+## Minor enhancements:
+
+ - Fix ls-files matching regexp [#3845](https://github.com/rubygems/rubygems/pull/3845)
+ - Remove redundant `bundler/setup` require from `spec_helper.rb` generated by `bundle gem` [#3791](https://github.com/rubygems/rubygems/pull/3791)
+
+## Bug fixes:
+
+ - Make `bundle clean --force` leave default gem executables untouched [#3907](https://github.com/rubygems/rubygems/pull/3907)
+ - Prioritize `path.system` over `path` when it makes sense [#3933](https://github.com/rubygems/rubygems/pull/3933)
+ - Sort requirements in Gem::Requirement to succeed comparison with different order [#3889](https://github.com/rubygems/rubygems/pull/3889)
+ - Print bug report template to standard error [#3924](https://github.com/rubygems/rubygems/pull/3924)
+ - Restore `bundle cache --all` in all cases [#3914](https://github.com/rubygems/rubygems/pull/3914)
+ - Move shebang to the top of `bin/console` template [#3927](https://github.com/rubygems/rubygems/pull/3927)
+ - Fix platform issues when running under a frozen bundle [#3909](https://github.com/rubygems/rubygems/pull/3909)
+ - Fix deprecation messages for `bundle install` flags, the config should be --local as before [#3917](https://github.com/rubygems/rubygems/pull/3917)
+ - Look for absolute path when removing bundler/setup from RUBYOPT in Bundler.unbundled_env method [#3877](https://github.com/rubygems/rubygems/pull/3877)
+ - Fix incorrect re-resolution when path gem excluded and not available [#3902](https://github.com/rubygems/rubygems/pull/3902)
+ - Fix error when building error message in `bundler/inline` [#3901](https://github.com/rubygems/rubygems/pull/3901)
+ - Fix regression related to locked ruby [#3900](https://github.com/rubygems/rubygems/pull/3900)
+ - Expand load paths in standalone setup.rb file [#3522](https://github.com/rubygems/rubygems/pull/3522)
+ - Fix broken exception recovery code when installing plugins [#3487](https://github.com/rubygems/rubygems/pull/3487)
+ - Fix incorrect build info on development versions of bundler, and on bundler versions installed as a default gem [#3778](https://github.com/rubygems/rubygems/pull/3778)
+ - Avoid autoloading `openssl` to try help with jruby load service issues [#3809](https://github.com/rubygems/rubygems/pull/3809)
+ - Fix `rake release` pushing all local tags instead of only the release tag [#3785](https://github.com/rubygems/rubygems/pull/3785)
+ - Fix `rake release` aborting when credentials file is missing, even if properly configured through XDG [#3783](https://github.com/rubygems/rubygems/pull/3783)
+
+## Deprecations:
+
+ - Deprecate `bundle cache --all` flag [#3932](https://github.com/rubygems/rubygems/pull/3932)
+
+## Documentation:
+
+ - Improve human readable fallback version of CLI help messages [#3921](https://github.com/rubygems/rubygems/pull/3921)
+ - Note CLI flag deprecations in documentation [#3915](https://github.com/rubygems/rubygems/pull/3915)
+ - Update man page and deprecation warning for binstubs --all [#3872](https://github.com/rubygems/rubygems/pull/3872)
+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
One small note, what about to add @
before GH handle in Rubygems changelog?
+* Make `--default` and `--install-dir` options to `gem install` play nice
+ together. Pull request #3906 by deivid-rodriguez
+* Make `--default` and `--install-dir` options to `gem install` play nice
+ together. Pull request #3906 by @deivid-rodriguez
My intention was to make the tasks configurable enough so that I could respect the current format each library use. I agree with your suggestion though, but I'd rather do it separately since we should probably update the whole Rubygems changelog in that case. |
Reword that bit to be more accurate.
6b382f4
to
4847cc5
Compare
Let's do it! |
🥳 🎉 |
Unify changelog handling for rubygems & bundler (cherry picked from commit 5294c86)
Unify changelog handling for rubygems & bundler (cherry picked from commit 5294c86)
Unify changelog handling for rubygems & bundler (cherry picked from commit 5294c86)
Unify changelog handling for rubygems & bundler (cherry picked from commit 5294c86)
Description:
This PR refactors the code to manage the rubygems changelog to reuse the same code bundler uses so that the way of handling both is consistent.
The workflow should now be the same for both, namely, make sure to use a proper label for PRs if they include user visible changes, and as long as we do that, we should be able to autogenerate the changelog without any user intervention.
Rubygems actually had some code to generate the changelog automatically, but had two problems:
Now you can generate the changelog to include all relevante PRs before a release by using
rake generate_changelog
.As a followup PR, I'll unify the release tasks for both libraries, not only the changelog.
Tasks:
I will abide by the code of conduct.