зеркало из https://github.com/github/ruby.git
Set date in message to the latest gem date [ci skip]
This commit is contained in:
Родитель
ef5717d923
Коммит
bf93ceb26b
|
@ -51,8 +51,9 @@ jobs:
|
|||
curl -O -R -z ./$data https://stdgems.org/$data
|
||||
|
||||
- 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: |
|
||||
|
@ -99,14 +100,15 @@ jobs:
|
|||
- name: Commit
|
||||
run: |
|
||||
git pull --ff-only origin ${GITHUB_REF#refs/heads/}
|
||||
message="Update bundled gems list at "
|
||||
message="Update bundled gems list"
|
||||
if [ -z "${gem}" ]; then
|
||||
git commit --message="${message}${GITHUB_SHA:0:30} [ci skip]"
|
||||
git commit --message="${message} at ${GITHUB_SHA:0:30} [ci skip]"
|
||||
else
|
||||
git commit --message="${message}${TODAY}"
|
||||
git commit --message="${message} as of ${TODAY}"
|
||||
fi
|
||||
git push origin ${GITHUB_REF#refs/heads/}
|
||||
env:
|
||||
TODAY: ${{ steps.bundled_gems.outputs.latest_date || env.TODAY }}
|
||||
EMAIL: svn-admin@ruby-lang.org
|
||||
GIT_AUTHOR_NAME: git
|
||||
GIT_COMMITTER_NAME: git
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
#!ruby -pla
|
||||
BEGIN {
|
||||
require 'rubygems'
|
||||
date = nil
|
||||
stdout = $>
|
||||
}
|
||||
END {
|
||||
stdout.print date.strftime("latest_date=%F") if date
|
||||
}
|
||||
unless /^[^#]/ !~ (gem = $F[0])
|
||||
(gem, src), = Gem::SpecFetcher.fetcher.detect(:latest) {|s|
|
||||
|
@ -13,6 +18,7 @@ unless /^[^#]/ !~ (gem = $F[0])
|
|||
else
|
||||
uri = $F[2]
|
||||
end
|
||||
date = gem.date if !date or gem.date && gem.date > date
|
||||
if $F[3]
|
||||
if $F[3].include?($F[1])
|
||||
$F[3][$F[1]] = gem.version.to_s
|
||||
|
|
Загрузка…
Ссылка в новой задаче