summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-08 00:21:42 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-08 00:22:25 +0900
commitf3bae2c6cff8eff83114df0e96fd6c338c90ee91 (patch)
treee79333a3f8182ec98b2e7f018d433e41af9d6cc4 /tool
parent5a6954ba74adf190a64f91598667520135284a1c (diff)
Touch copied cache files to make tarballs stable
Diffstat (limited to 'tool')
-rwxr-xr-xtool/make-snapshot13
1 files changed, 8 insertions, 5 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot
index 7bdfcd7842..cacf97199a 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -300,7 +300,7 @@ def package(vcs, rev, destdir, tmp = nil)
rescue SystemCallError
end
begin
- FileUtils.cp_r(file, dest, preserve: true)
+ FileUtils.cp_r(file, dest)
rescue SystemCallError
end
end
@@ -449,10 +449,6 @@ update-gems:
$(UNICODE_SRC_DATA_DIR)/.unicode-tables.time:
touch-unicode-files:
APPEND
- mk << <<-APPEND
-after-update::
-\t$(Q) $(RUNRUBY) -C gems -e 'Dir.glob("*") {|f|File.rename(File.readlink(f), f) rescue nil}'
- APPEND
open(clean.add("Makefile"), "w") do |f|
f.puts mk
end
@@ -463,6 +459,13 @@ after-update::
args = args.map {|arg| arg.join("=")}
system(make, "update-download", *args)
clean.push("rbconfig.rb", ".rbconfig.time", "enc.mk", "ext/ripper/y.output", ".revision.time")
+ Dir.glob("**/*") do |dest|
+ next unless File.symlink?(dest)
+ orig = File.expand_path(File.readlink(dest), File.dirname(dest))
+ File.unlink(dest)
+ FileUtils.cp_r(orig, dest)
+ end
+ File.utime(modified, modified, *Dir.glob(["tool/config.{guess,sub}", "gems/*.gem", "tool"]))
if modified
new_time = modified + 2
touch_all(new_time, "**/*", File::FNM_DOTMATCH) do |name, stat|