dockly 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,12 +27,13 @@ class Dockly::BuildCache::Docker < Dockly::BuildCache::Base
27
27
  debug "inserting to #{output_directory}"
28
28
  path = File.expand_path(cache.path)
29
29
  path_parent = File.dirname(path)
30
+ tar_flags = keep_old_files ? '-xfk' : 'xf'
30
31
  container = ::Docker::Container.create(
31
32
  'Image' => image.id,
32
33
  'Cmd' => ['/bin/bash', '-lc', [
33
34
  "mkdir -p #{File.dirname(output_directory)}",
34
35
  '&&',
35
- "tar -xf#{'k' if keep_old_files} #{File.join('/', 'host', path)} -C #{File.dirname(output_directory)}"
36
+ "tar #{tar_flags} #{File.join('/', 'host', path)} -C #{File.dirname(output_directory)}"
36
37
  ].join(' ')
37
38
  ],
38
39
  'Volumes' => {
@@ -1,3 +1,3 @@
1
1
  module Dockly
2
- VERSION = '1.5.1'
2
+ VERSION = '1.5.2'
3
3
  end
@@ -17,6 +17,7 @@ describe Dockly::BuildCache::Docker, :docker do
17
17
  build_cache.build_command 'touch lol'
18
18
  build_cache.output_dir '/etc/vim'
19
19
  build_cache.base_dir '/'
20
+ build_cache.keep_old_files true
20
21
  docker.build_cache :test_build_cache
21
22
  end
22
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dockly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: