mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Move stats under a dict
This commit is contained in:
parent
61aff0cd18
commit
3a29f05ba5
1 changed files with 7 additions and 6 deletions
|
@ -86,7 +86,7 @@ eom
|
||||||
# show diff shortstat
|
# show diff shortstat
|
||||||
tag = "v#{version.gsub(/[.\-]/, '_')}"
|
tag = "v#{version.gsub(/[.\-]/, '_')}"
|
||||||
stat = `git diff --shortstat #{prev_tag}..#{tag}`
|
stat = `git diff --shortstat #{prev_tag}..#{tag}`
|
||||||
total_files, insertions, deletions = stat.scan(/\d+/)
|
files_changed, insertions, deletions = stat.scan(/\d+/)
|
||||||
end
|
end
|
||||||
|
|
||||||
xy = version[/\A\d+\.\d+/]
|
xy = version[/\A\d+\.\d+/]
|
||||||
|
@ -96,7 +96,7 @@ eom
|
||||||
#end
|
#end
|
||||||
update_branches_yml(version, xy, wwwdir)
|
update_branches_yml(version, xy, wwwdir)
|
||||||
update_downloads_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
|
tarballs
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ eom
|
||||||
end
|
end
|
||||||
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"
|
filename = "_data/releases.yml"
|
||||||
orig_data = File.read(File.join(wwwdir, filename))
|
orig_data = File.read(File.join(wwwdir, filename))
|
||||||
data = orig_data.dup
|
data = orig_data.dup
|
||||||
|
@ -173,7 +173,8 @@ eom
|
||||||
- version: #{ver}
|
- version: #{ver}
|
||||||
date: #{date.strftime("%Y-%m-%d")}
|
date: #{date.strftime("%Y-%m-%d")}
|
||||||
post: /en/news/#{date.strftime("%Y/%m/%d")}/ruby-#{ver.tr('.', '-')}-released/
|
post: /en/news/#{date.strftime("%Y/%m/%d")}/ruby-#{ver.tr('.', '-')}-released/
|
||||||
total_files: #{total_files}
|
stats:
|
||||||
|
files_changed: #{files_changed}
|
||||||
insertions: #{insertions}
|
insertions: #{insertions}
|
||||||
deletions: #{deletions}
|
deletions: #{deletions}
|
||||||
url:
|
url:
|
||||||
|
|
Loading…
Reference in a new issue