[前][次][番号順一覧][スレッド一覧]

ruby-changes:65798

From: Yusuke <ko1@a...>
Date: Mon, 5 Apr 2021 23:20:57 +0900 (JST)
Subject: [ruby-changes:65798] e0bd293855 (master): Update tool/format-release

https://git.ruby-lang.org/ruby.git/commit/?id=e0bd293855

From e0bd293855d0062a895233e7735b9c65db7c5500 Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Mon, 5 Apr 2021 23:19:44 +0900
Subject: Update tool/format-release

* remove bz2 entries for Ruby 3 series
* remove stats information except "X.X.0" release
---
 tool/format-release | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/tool/format-release b/tool/format-release
index b34da35..cdc2d55 100755
--- a/tool/format-release
+++ b/tool/format-release
@@ -173,10 +173,18 @@ eom https://github.com/ruby/ruby/blob/trunk/tool/format-release#L173
 - version: #{ver}
   date: #{date.strftime("%Y-%m-%d")}
   post: /en/news/#{date.strftime("%Y/%m/%d")}/ruby-#{ver.tr('.', '-')}-released/
+eom
+
+    if ver.end_with?(".0")
+      entry <<= <<eom
   stats:
     files_changed: #{files_changed}
     insertions: #{insertions}
     deletions: #{deletions}
+eom
+    end
+
+    entry <<= <<eom
   url:
     gz:  https://cache.ruby-lang.org/pub/ruby/#{xy}/ruby-#{ver}.tar.gz
     zip: https://cache.ruby-lang.org/pub/ruby/#{xy}/ruby-#{ver}.zip
@@ -185,25 +193,29 @@ eom https://github.com/ruby/ruby/blob/trunk/tool/format-release#L193
   size:
     gz:  #{ary.find{|x|x.gz? }.size}
     zip: #{ary.find{|x|x.zip?}.size}
-    bz2: #{ary.find{|x|x.bz2?}.size}
+    bz2: #{ary.find{|x|x.bz2?}&.size}
     xz:  #{ary.find{|x|x.xz? }.size}
   sha1:
     gz:  #{ary.find{|x|x.gz? }.sha1}
     zip: #{ary.find{|x|x.zip?}.sha1}
-    bz2: #{ary.find{|x|x.bz2?}.sha1}
+    bz2: #{ary.find{|x|x.bz2?}&.sha1}
     xz:  #{ary.find{|x|x.xz? }.sha1}
   sha256:
     gz:  #{ary.find{|x|x.gz? }.sha256}
     zip: #{ary.find{|x|x.zip?}.sha256}
-    bz2: #{ary.find{|x|x.bz2?}.sha256}
+    bz2: #{ary.find{|x|x.bz2?}&.sha256}
     xz:  #{ary.find{|x|x.xz? }.sha256}
   sha512:
     gz:  #{ary.find{|x|x.gz? }.sha512}
     zip: #{ary.find{|x|x.zip?}.sha512}
-    bz2: #{ary.find{|x|x.bz2?}.sha512}
+    bz2: #{ary.find{|x|x.bz2?}&.sha512}
     xz:  #{ary.find{|x|x.xz? }.sha512}
 eom
 
+    if ver.start_with?("3.")
+      entry = entry.gsub(/    bz2: .*\n/, "")
+    end
+
     if data.include?("\n- version: #{ver}\n")
     elsif data.sub!(/\n# #{Regexp.escape(xy)} series\n/, "\\&\n#{entry}")
     else
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]