CircleCI-Public / cimg-ruby

The CircleCI Ruby Docker Convenience Image.
https://circleci.com/developer/images/image/cimg/ruby
MIT License
33 stars 39 forks source link

Update rubyFeed regex to allow for v prefix of releases #175

Closed schinery closed 4 months ago

schinery commented 4 months ago

Description

Update the rubyFeed regex to allow for v prefix of releases

Reasons

As flagged by @miyucy in https://github.com/CircleCI-Public/cimg-ruby/issues/174 the latest Ruby release is listed as v3.3.3.

The current regex:

curl --silent "https://github.com/ruby/ruby/tags.atom" | grep -E '(title)' | tail -n +2 | sed -e 's/^[ \t]*//' | sed -e 's/<title>//' -e 's/<\/title>//'

v3.3.3
3.3.2
3.1.6
3.4.0-preview1
3.3.1
3.2.4
3.1.5
3.0.7
3.2.3
3.3.0

With the added [v?]* to the regex the version list now looks like:

curl --silent "https://github.com/ruby/ruby/tags.atom" | grep -E '(title)' | tail -n +2 | sed -e 's/^[ \t]*//' | sed -e 's/<title>[v?]*//' -e 's/<\/title>//'
3.3.3
3.3.2
3.1.6
3.4.0-preview1
3.3.1
3.2.4
3.1.5
3.0.7
3.2.3
3.3.0
maddieholtzer commented 4 months ago

Thank you for handling this! I believe this should unblock my team in updating to 3.3.3