ruby-changes:71960
From: Nobuyoshi <ko1@a...>
Date: Wed, 25 May 2022 19:05:27 +0900 (JST)
Subject: [ruby-changes:71960] 8006a15edf (master): [ruby/timeout] Add epoch.rake [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=8006a15edf From 8006a15edf63f3f277a696e332682a2c6b6b7768 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 25 May 2022 19:04:31 +0900 Subject: [ruby/timeout] Add epoch.rake [ci skip] https://github.com/ruby/timeout/commit/5153ae9cad --- lib/timeout/timeout.gemspec | 2 +- rakelib/epoch.rake | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 rakelib/epoch.rake diff --git a/lib/timeout/timeout.gemspec b/lib/timeout/timeout.gemspec index b0a68122cb..eb360d1d90 100644 --- a/lib/timeout/timeout.gemspec +++ b/lib/timeout/timeout.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |spec| https://github.com/ruby/ruby/blob/trunk/lib/timeout/timeout.gemspec#L23 spec.files = Dir.chdir(__dir__) do `git ls-files -z`.split("\x0").reject do |f| - (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)}) + (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features|rakelib)/|\.(?:git|travis|circleci)|appveyor|Rakefile)}) end end spec.bindir = "exe" diff --git a/rakelib/epoch.rake b/rakelib/epoch.rake new file mode 100644 index 0000000000..80f27c9571 --- /dev/null +++ b/rakelib/epoch.rake @@ -0,0 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/rakelib/epoch.rake#L1 +task "build" => "date_epoch" + +task "date_epoch" do + ENV["SOURCE_DATE_EPOCH"] = IO.popen(%W[git -C #{__dir__} log -1 --format=%ct], &:read).chomp +end -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/