Select the destination for the latest date by whether inplace mode
This commit is contained in:
parent
bba9465934
commit
934beac118
2
.github/workflows/bundled_gems.yml
vendored
2
.github/workflows/bundled_gems.yml
vendored
@ -58,7 +58,7 @@ jobs:
|
||||
- name: Update bundled gems list
|
||||
id: bundled_gems
|
||||
run: |
|
||||
ruby -i~ tool/update-bundled_gems.rb gems/bundled_gems
|
||||
ruby -i~ tool/update-bundled_gems.rb gems/bundled_gems >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Maintain updated gems list in NEWS
|
||||
run: |
|
||||
|
@ -2,13 +2,10 @@
|
||||
BEGIN {
|
||||
require 'rubygems'
|
||||
date = nil
|
||||
if ENV.key?('GITHUB_OUTPUT')
|
||||
output = File.open(ENV['GITHUB_OUTPUT'], 'w')
|
||||
else
|
||||
output = STDERR
|
||||
end
|
||||
}
|
||||
END {
|
||||
# STDOUT is not usable in inplace edit mode
|
||||
output = $-i ? STDOUT : STDERR
|
||||
output.print date.strftime("latest_date=%F") if date
|
||||
}
|
||||
unless /^[^#]/ !~ (gem = $F[0])
|
||||
|
Loading…
x
Reference in New Issue
Block a user