carthage_cache 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/README.md +2 -0
- data/lib/carthage_cache/build_collector.rb +27 -12
- data/lib/carthage_cache/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdeb2c1edb2a91fad5618b77bdce1b3a9bc47805
|
4
|
+
data.tar.gz: 268f0b7787a0483b3560750d343d588885a37b50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bef1b5390c853648e71cdbffcf06dc94830be0ee5bd45460fab484616cf323cc53355e4cf9327b636a19952ac2ad67a11f50032418ef985c34a2c371aece40ce
|
7
|
+
data.tar.gz: 6cdfcc331e81e216964c4660ec1bdde7325880e3678c91ea13b4bb383b76289418e1f3eb644838841fdec3567676e69c2a631e619f7e77fef8a4d0fe114c191c
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.1
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -14,6 +14,8 @@ When you add slow building environments like Travis CI to the mix, a project boo
|
|
14
14
|
CarthageCache generates a hash key based on the content of your `Cartfile.resolved` and the current
|
15
15
|
installed version of Swift. Then it checks if there is a cache archive (a zip file of your `Carthage/Build` directory) associated to that hash. If there is one it will download it and install it in your project avoiding the need to run `carthage bootstrap`.
|
16
16
|
|
17
|
+
**Do you want to improve carthage_cache?** [Check all the issues tagged with `help-wanted`!](https://github.com/guidomb/carthage_cache/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22). I'll be more than happy to review your pull request.
|
18
|
+
|
17
19
|
## Installation
|
18
20
|
|
19
21
|
Add this line to your application's Gemfile:
|
@@ -7,24 +7,22 @@ module CarthageCache
|
|
7
7
|
attr_reader :terminal
|
8
8
|
attr_reader :build_directory
|
9
9
|
attr_reader :required_frameworks
|
10
|
+
attr_reader :command_executor
|
10
11
|
|
11
|
-
def initialize(terminal, build_directory, required_frameworks)
|
12
|
+
def initialize(terminal, build_directory, required_frameworks, command_executor = ShellCommandExecutor.new)
|
12
13
|
@terminal = terminal
|
13
14
|
@build_directory = build_directory
|
14
15
|
@required_frameworks = Set.new(required_frameworks)
|
16
|
+
@command_executor = command_executor
|
15
17
|
end
|
16
18
|
|
17
19
|
def delete_unused_frameworks(white_list = {})
|
18
20
|
terminal.vputs "Deleting unused frameworks from '#{build_directory}' ..."
|
19
21
|
list_built_frameworks.each do |framework_path|
|
20
22
|
if delete_framework?(framework_path, white_list)
|
21
|
-
|
22
|
-
FileUtils.rm_r(framework_path)
|
23
|
+
delete_framework_files(framework_path)
|
23
24
|
end
|
24
25
|
end
|
25
|
-
|
26
|
-
symbol_table_files.each { |x| FileUtils.rm_r(x) }
|
27
|
-
dsym_files.each { |x| FileUtils.rm_r(x) }
|
28
26
|
end
|
29
27
|
|
30
28
|
private
|
@@ -42,16 +40,33 @@ module CarthageCache
|
|
42
40
|
Dir[File.join(build_directory, "/**/*.framework")]
|
43
41
|
end
|
44
42
|
|
45
|
-
def
|
46
|
-
|
43
|
+
def framework_name(framework_path)
|
44
|
+
Pathname.new(framework_path).basename(".framework").to_s
|
45
|
+
end
|
46
|
+
|
47
|
+
def delete_framework_files(framework_path)
|
48
|
+
framework_dsym_path = "#{framework_path}.dSYM"
|
49
|
+
terminal.vputs "Deleting #{framework_name(framework_path)} files because they are no longer needed ..."
|
50
|
+
terminal.vputs "Deleting '#{framework_dsym_path}' ..."
|
51
|
+
FileUtils.rm_r(framework_dsym_path)
|
52
|
+
terminal.vputs "Deleting '#{framework_path}' ..."
|
53
|
+
FileUtils.rm_r(framework_path)
|
54
|
+
symbol_map_files(framework_dsym_path).each do |symbol_table_file|
|
55
|
+
terminal.vputs "Deleting '#{symbol_table_file}' ..."
|
56
|
+
FileUtils.rm(symbol_table_file)
|
57
|
+
end
|
58
|
+
terminal.vputs ""
|
47
59
|
end
|
48
60
|
|
49
|
-
def
|
50
|
-
|
61
|
+
def symbol_map_files(framework_dsym_path)
|
62
|
+
uuid_dwarfdump(framework_dsym_path)
|
63
|
+
.split("\n")
|
64
|
+
.map { |line| line.match(/UUID: (.*) \(/)[1] }
|
65
|
+
.map { |uuid| File.expand_path(File.join(framework_dsym_path, "../#{uuid}.bcsymbolmap")) }
|
51
66
|
end
|
52
67
|
|
53
|
-
def
|
54
|
-
|
68
|
+
def uuid_dwarfdump(framework_dsym_path)
|
69
|
+
command_executor.execute("/usr/bin/xcrun dwarfdump --uuid #{framework_dsym_path}")
|
55
70
|
end
|
56
71
|
|
57
72
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carthage_cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guido Marucci Blas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
version: '0'
|
186
186
|
requirements: []
|
187
187
|
rubyforge_project:
|
188
|
-
rubygems_version: 2.
|
188
|
+
rubygems_version: 2.5.1
|
189
189
|
signing_key:
|
190
190
|
specification_version: 4
|
191
191
|
summary: A tool that allows to cache Carthage/Build folder in Amazon S3.
|