aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNARUSE, Yui <naruse@airemix.jp>2019-12-22 01:39:17 +0900
committerNARUSE, Yui <naruse@airemix.jp>2019-12-22 02:51:22 +0900
commit3a29f05ba5ba7ed4b821ba5f566eeb3ff3c5c3b1 (patch)
tree556a03abc2c81bb40a88f63b3c18feb1f87c234d
parent61aff0cd189e67fa6f2565639ad0128fa33b88fc (diff)
downloadruby-3a29f05ba5ba7ed4b821ba5f566eeb3ff3c5c3b1.tar.gz
Move stats under a dict
-rwxr-xr-xtool/format-release13
1 files changed, 7 insertions, 6 deletions
diff --git a/tool/format-release b/tool/format-release
index 366e1e5..ec2d535 100755
--- a/tool/format-release
+++ b/tool/format-release
@@ -86,7 +86,7 @@ eom
# show diff shortstat
tag = "v#{version.gsub(/[.\-]/, '_')}"
stat = `git diff --shortstat #{prev_tag}..#{tag}`
- total_files, insertions, deletions = stat.scan(/\d+/)
+ files_changed, insertions, deletions = stat.scan(/\d+/)
end
xy = version[/\A\d+\.\d+/]
@@ -96,7 +96,7 @@ eom
#end
update_branches_yml(version, xy, wwwdir)
update_downloads_yml(version, xy, wwwdir)
- update_releases_yml(version, xy, tarballs, wwwdir, total_files, insertions, deletions)
+ update_releases_yml(version, xy, tarballs, wwwdir, files_changed, insertions, deletions)
tarballs
end
@@ -163,7 +163,7 @@ eom
end
end
- def self.update_releases_yml(ver, xy, ary, wwwdir, total_files, insertions, deletions)
+ def self.update_releases_yml(ver, xy, ary, wwwdir, files_changed, insertions, deletions)
filename = "_data/releases.yml"
orig_data = File.read(File.join(wwwdir, filename))
data = orig_data.dup
@@ -173,9 +173,10 @@ eom
- version: #{ver}
date: #{date.strftime("%Y-%m-%d")}
post: /en/news/#{date.strftime("%Y/%m/%d")}/ruby-#{ver.tr('.', '-')}-released/
- total_files: #{total_files}
- insertions: #{insertions}
- deletions: #{deletions}
+ stats:
+ files_changed: #{files_changed}
+ insertions: #{insertions}
+ deletions: #{deletions}
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