update-eol script now with JRuby support

This commit is contained in:
Mislav Marohnić 2025-08-11 15:40:57 +02:00
parent f2ebf449b4
commit e7b46cabe6
No known key found for this signature in database

View file

@ -13,7 +13,7 @@ date_to_seconds() {
now_seconds="$(date '+%s')"
curl -fsSL https://endoflife.date/api/ruby.json | jq -r '.[] | [.cycle,.eol] | @tsv' | while read -r cycle eol_date; do
while read -r cycle eol_date; do
eol_seconds="$(date_to_seconds "$eol_date")"
days_to_eol=$(((eol_seconds - now_seconds) / 60 / 60 / 24))
if [ $days_to_eol -lt 0 ]; then
@ -23,7 +23,14 @@ curl -fsSL https://endoflife.date/api/ruby.json | jq -r '.[] | [.cycle,.eol] | @
grep -L warn_unsupported share/ruby-build/"$cycle"[.-]* | grep -ve '-dev$' | \
xargs sed -i.bak -E '/openssl/n; s/(.+)"/\1" warn_unsupported/'
fi
done
done < <(
curl -fsSL https://endoflife.date/api/ruby.json | jq -r '.[] | [.cycle,.eol] | @tsv'
printf "%s\t%s\n" "jruby-9.0" "1970-01-01"
printf "%s\t%s\n" "jruby-9.1" "1970-01-01"
printf "%s\t%s\n" "jruby-9.2" "1970-01-01"
printf "%s\t%s\n" "jruby-9.3" "2024-01-01"
printf "%s\t%s\n" "jruby-9.4" "2026-05-01"
)
num_updated="$(rm -fv share/ruby-build/*.bak | wc -l)"
printf "definition files updated: %d\n" "$num_updated"