aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2023-10-25 13:09:49 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2023-10-25 13:10:28 +0900
commita6a67b0524ec3f8da96143cdf5094b5eaf7d820d (patch)
tree454500fe9a021227f982b55abd38ee74b27f50ec
parentc5861903ac5f89cafb131400835b2e3b207ba928 (diff)
downloadruby-a6a67b0524ec3f8da96143cdf5094b5eaf7d820d.tar.gz
Do not append latest_date to gems/bundled_gems [ci skip]
-rw-r--r--.github/workflows/bundled_gems.yml2
-rwxr-xr-xtool/update-bundled_gems.rb8
2 files changed, 7 insertions, 3 deletions
diff --git a/.github/workflows/bundled_gems.yml b/.github/workflows/bundled_gems.yml
index 1827420154..077031843f 100644
--- a/.github/workflows/bundled_gems.yml
+++ b/.github/workflows/bundled_gems.yml
@@ -53,7 +53,7 @@ jobs:
- name: Update bundled gems list
id: bundled_gems
run: |
- ruby -i~ tool/update-bundled_gems.rb gems/bundled_gems > $GITHUB_OUTPUT
+ ruby -i~ tool/update-bundled_gems.rb gems/bundled_gems
- name: Maintain updated gems list in NEWS
run: |
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|