diff options
author | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2023-10-25 13:09:49 +0900 |
---|---|---|
committer | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2023-10-25 13:10:28 +0900 |
commit | a6a67b0524ec3f8da96143cdf5094b5eaf7d820d (patch) | |
tree | 454500fe9a021227f982b55abd38ee74b27f50ec /tool | |
parent | c5861903ac5f89cafb131400835b2e3b207ba928 (diff) | |
download | ruby-a6a67b0524ec3f8da96143cdf5094b5eaf7d820d.tar.gz |
Do not append latest_date to gems/bundled_gems [ci skip]
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/update-bundled_gems.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tool/update-bundled_gems.rb b/tool/update-bundled_gems.rb index fbba589cd6..6b40595960 100755 --- a/tool/update-bundled_gems.rb +++ b/tool/update-bundled_gems.rb @@ -2,10 +2,14 @@ BEGIN { require 'rubygems' date = nil - stdout = $> + if ENV.key?('GITHUB_OUTPUT') + output = File.open(ENV['GITHUB_OUTPUT'], 'w') + else + output = STDERR + end } END { - stdout.print date.strftime("latest_date=%F") if date + output.print date.strftime("latest_date=%F") if date } unless /^[^#]/ !~ (gem = $F[0]) (gem, src), = Gem::SpecFetcher.fetcher.detect(:latest) {|s| |