wslc-wip 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/wip/build_context.rb +5 -2
- data/lib/wip/debug_reporter.rb +9 -2
- data/lib/wip/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '029d796a1f1d80a039fc1765f194b6b9cd144ceed002568bc9f38275814bb31a'
|
|
4
|
+
data.tar.gz: 13c45a601b75b7a32dba0824a3424f1f34adc86dc176957318eabc783416ca2d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b9941bb1dab65040e55e2711681283ab43a12c5715ea3af8a64b349a110a80e2066380109d6567667bb00fa898b9f66b34f5c000d382d989419e310d14a27531
|
|
7
|
+
data.tar.gz: 6e5f11ceb6282415d6f8d164c3bde0620c9d2f9886af96d8c08f55d329ebb21efd65d4198dad3669e19566075b08df324abdfe3c0feb57eb605820f5ccff1447
|
data/lib/wip/build_context.rb
CHANGED
|
@@ -29,7 +29,10 @@ module Wip
|
|
|
29
29
|
each_included_file do |relative_path|
|
|
30
30
|
target = destination.join(relative_path)
|
|
31
31
|
FileUtils.mkdir_p(target.dirname)
|
|
32
|
-
|
|
32
|
+
# Keep links as links. Dereferencing a link here could copy arbitrary
|
|
33
|
+
# host files outside the build context (for example, ~/.ssh/id_rsa)
|
|
34
|
+
# into the staged directory and expose them to the image build.
|
|
35
|
+
FileUtils.copy_entry(@root.join(relative_path), target, false, false, false)
|
|
33
36
|
end
|
|
34
37
|
end
|
|
35
38
|
|
|
@@ -38,7 +41,7 @@ module Wip
|
|
|
38
41
|
next if %w[. ..].include?(entry)
|
|
39
42
|
|
|
40
43
|
path = @root.join(entry)
|
|
41
|
-
next unless path.file?
|
|
44
|
+
next unless path.file? || path.symlink?
|
|
42
45
|
next if @ignore.ignored?(entry)
|
|
43
46
|
|
|
44
47
|
yield entry
|
data/lib/wip/debug_reporter.rb
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'tmpdir'
|
|
4
|
+
require 'tempfile'
|
|
4
5
|
|
|
5
6
|
module Wip
|
|
6
7
|
# Prints each step wip takes and how long it took, when debug mode is enabled.
|
|
@@ -45,8 +46,14 @@ module Wip
|
|
|
45
46
|
return open_log(@log, "streaming resource snapshots to #{@log}") if @log
|
|
46
47
|
return nil if live
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
# `Tempfile.create`, unlike `Tempfile.new`, leaves the file on disk after
|
|
50
|
+
# we close it, so the path printed just below is still there to read.
|
|
51
|
+
# It still creates with O_EXCL and 0600, which is what stops a
|
|
52
|
+
# predictable name in a shared /tmp from being pre-created as a symlink.
|
|
53
|
+
file = Tempfile.create(['wip-debug-', '.log'])
|
|
54
|
+
file.sync = true
|
|
55
|
+
@out.puts "wip: [debug] command owns the terminal; streaming resource snapshots to #{file.path}"
|
|
56
|
+
file
|
|
50
57
|
end
|
|
51
58
|
|
|
52
59
|
def open_log(path, notice)
|
data/lib/wip/version.rb
CHANGED