Created
July 15, 2022 07:00
-
-
Save pocke/f4936465ea1a3b1de1951216a428a274 to your computer and use it in GitHub Desktop.
Open all rails/rails release between specified versions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# # Open all releases between 6.1 and 7.0 | |
# $ ruby open-releases.rb 6.1 7.0 | |
tags = `git tag`.lines(chomp: true).map { _1[/^v(.+)$/, 1] }.compact.map { Gem::Version.new _1 rescue nil }.compact | |
s, e = ARGV.map { Gem::Version.new _1 } | |
vs = tags.select { s < _1 && _1 <= e } | |
vs.each do |v| | |
url = "https://github.com/rails/rails/releases/tag/v#{v}" | |
`open #{url}` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment