ruby-changes:70266
From: Nobuyoshi <ko1@a...>
Date: Fri, 17 Dec 2021 02:57:47 +0900 (JST)
Subject: [ruby-changes:70266] 693a561cfa (master): [DOC] Exclude non-updated stdlibs since the previous release
https://git.ruby-lang.org/ruby.git/commit/?id=693a561cfa From 693a561cfa19dc35ff0d199a1934c9927dd388d5 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 17 Dec 2021 02:36:09 +0900 Subject: [DOC] Exclude non-updated stdlibs since the previous release --- .github/workflows/check_misc.yml | 43 +++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check_misc.yml b/.github/workflows/check_misc.yml index f4d89ea6a8a..0161cb1135f 100644 --- a/.github/workflows/check_misc.yml +++ b/.github/workflows/check_misc.yml @@ -22,19 +22,48 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/check_misc.yml#L22 git grep -l -F -e $header -e HAVE_`echo $header | tr a-z./ A-Z__` -- . > /dev/null || echo $header done | grep -F . working-directory: include - - name: Maintain updated default gem list + + - name: Download default gems list run: | - news = File.read("NEWS.md") + curl -O https://stdgems.org/default_gems.json + + - name: Make default gems list + run: | + require 'rubygems' $:.unshift "lib" - gems = Dir.glob("{ext,lib}/**/*.gemspec").map {|f| + rgver = File.foreach("lib/rubygems.rb") do |line| + break $1 if /^\s*VERSION\s*=\s*"([^"]+)"/ =~ line + end + gems = Dir.glob("{ext,lib}/**/*.gemspec").map do |f| spec = Gem::Specification.load(f) - [spec.name, spec.version] - }.sort - news.sub!(/^\*\s+The following default gem are updated\.\K(\n\s+\*\s+)((?i:RubyGems))(?:\1.*)*/) do - ["", $2, gems.map {|*spec| spec.join(" ")}].join($1) + "#{spec.name} #{spec.version}" + end.sort + File.open("stdlibs", "w") do |f| + f.puts "RubyGems #{rgver}" + f.puts gems + end + shell: ruby --disable=gems {0} + + - name: Maintain updated default gems list in NEWS + run: | + require 'json' + news = File.read("NEWS.md") + prev = news[/since the \*+(\d+\.\d+\.\d+)\*+/, 1] + prevs = [prev, prev.sub(/\.\d+\z/, '')] + last = JSON.parse(File.read("default_gems.json"))['gems'].filter_map do |g| + v = g['versions'].values_at(*prevs).compact.first + g = g['gem'] + g == 'RubyGems' if g == 'rubygems' + "#{g} #{v}" if v + end + new = File.readlines('stdlibs', chomp: true).grep_v(/^#/) + gems = new - last + news.sub!(/^\*\s+The following default gems? are updated\.\K(\n\s+\*\s+).*(?:\1.*)*/) do + ["", gems].join($1) end or exit File.write("NEWS.md", news) shell: ruby {0} + - name: Check diffs id: diff run: | -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/