mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-09-03 07:41:23 +02:00
update-eol
script now with JRuby support
This commit is contained in:
parent
f2ebf449b4
commit
e7b46cabe6
1 changed files with 9 additions and 2 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue