carthage_remote_cache 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,81 +1,88 @@
1
1
  class CarthageArchive
2
-
3
- attr_reader :archive_filename, :archive_path
4
-
5
- def initialize(framework_name, platform)
6
- raise AppError.new, "Platform #{platform.inspect} needs to be a symbol" unless platform.kind_of?(Symbol)
7
-
8
- @framework_name = framework_name
9
- @platform = platform
10
- @archive_filename = "#{framework_name}-#{platform}.zip"
11
- @archive_path = @archive_filename
12
- end
13
-
14
- # Aggregate following files:
15
- # - Carthage/Build/iOS/Alamofire.framework
16
- # - Carthage/Build/iOS/Alamofire.framework/Alamofire
17
- # - Carthage/Build/iOS/618BEB79-4C7F-3692-B140-131FB983AC5E.bcsymbolmap
18
- # into Alamofire-iOS.zip
19
- def create_archive
20
- $LOG.debug("Archiving #{@framework_name} for #{@platform}")
21
-
22
- platform_path = File.join(CARTHAGE_BUILD_DIR, platform_to_carthage_dir_string(@platform))
23
- framework_path = File.join(platform_path, "#{@framework_name}.framework")
24
- raise AppError.new, "Archive can't be created, no framework directory at #{framework_path}" unless Dir.exist?(framework_path)
25
-
26
- dsym_path = File.join(platform_path, "#{@framework_name}.framework.dSYM")
27
- raise AppError.new, "DSYM File #{dsym_path} is missing" unless File.exist?(dsym_path)
28
-
29
- binary_path = File.join(framework_path, @framework_name)
30
- raise AppError.new, "Binary #{binary_path} is missing, failed to read .bcsymbolmap files" unless File.exist?(binary_path)
31
-
32
- bcsymbolmap_paths = find_bcsymbolmap_paths(platform_path, binary_path)
33
-
34
- archived_paths = [framework_path, dsym_path] + bcsymbolmap_paths
35
-
36
- $LOG.debug("Adding > #{archived_paths.inspect}")
37
-
38
- delete_archive
39
- sh("zip -r #{quote @archive_path} #{quote archived_paths}")
40
- $LOG.debug("Created #{@archive_path} archive, file size: #{formatted_archive_size}")
41
- end
42
-
43
- def unpack_archive
44
- raise AppError.new, "Archive #{@archive_path} is missing" unless File.exist?(@archive_path)
45
- $LOG.debug("Unpacking #{@archive_path}, file size: #{formatted_archive_size}")
46
- sh("unzip -o #{quote @archive_path}")
47
- end
48
-
49
- def delete_archive
50
- File.delete(@archive_path) if File.exist?(@archive_path)
51
- end
52
-
53
- private
54
-
55
- def find_bcsymbolmap_paths(platform_path, binary_path)
56
- raw_dwarfdump = dwarfdump(binary_path)
57
- uuids = parse_uuids(raw_dwarfdump)
58
- bcsymbolmap_paths = uuids.map { |uuid| File.join(platform_path, "#{uuid}.bcsymbolmap") }.select { |path| File.exist?(path) }
59
- bcsymbolmap_paths
60
- end
61
-
62
- def dwarfdump(binary_path)
63
- sh("/usr/bin/xcrun dwarfdump --uuid \"#{binary_path}\"")
64
- end
65
-
66
- # Example dwarfdump link:
67
- # UUID: 618BEB79-4C7F-3692-B140-131FB983AC5E (i386) Carthage/Build/iOS/CocoaLumberjackSwift.framework/CocoaLumberjackSwift
68
- def parse_uuids(raw_dwarfdump)
69
- lines = raw_dwarfdump.split("\n")
70
- uuids = lines.map { |line| line[/^UUID: ([A-Z0-9\-]+)\s+\(.*$/, 1] }
71
- uuids.compact
72
- end
73
-
74
- # E.g. "1.4MB"
75
- def formatted_archive_size
76
- size = File.size(@archive_path)
77
- megabytes = size / 1024.0 / 1024.0
78
- "#{megabytes.round(1)}MB"
2
+ attr_reader :archive_filename, :archive_path
3
+
4
+ def initialize(framework_name, platform)
5
+ raise AppError.new, "Platform #{platform.inspect} needs to be a symbol" unless platform.kind_of?(Symbol)
6
+
7
+ @framework_name = framework_name
8
+ @platform = platform
9
+ @archive_filename = "#{framework_name}-#{platform}.zip"
10
+ @archive_path = @archive_filename
11
+ end
12
+
13
+ # Aggregate following files:
14
+ # - Carthage/Build/iOS/Alamofire.framework
15
+ # - Carthage/Build/iOS/Alamofire.framework/Alamofire
16
+ # - Carthage/Build/iOS/618BEB79-4C7F-3692-B140-131FB983AC5E.bcsymbolmap
17
+ # into Alamofire-iOS.zip
18
+ def create_archive(shell, should_include_dsym, carthage_build_dir = CARTHAGE_BUILD_DIR)
19
+ $LOG.debug("Archiving #{@framework_name} for #{@platform}")
20
+
21
+ platform_path = File.join(carthage_build_dir, platform_to_carthage_dir_string(@platform))
22
+ framework_path = File.join(platform_path, "#{@framework_name}.framework")
23
+ raise MissingFrameworkDirectoryError.new, "Archive can't be created, no framework directory at #{framework_path}" unless Dir.exist?(framework_path)
24
+
25
+ # It's very likely, that binary releases don't contain DSYMs.
26
+ dsym_path = File.join(platform_path, "#{@framework_name}.framework.dSYM")
27
+ unless File.exist?(dsym_path)
28
+ if should_include_dsym
29
+ raise AppError.new, "DSYM File #{dsym_path} not found"
30
+ else
31
+ $LOG.error("DSYM File #{dsym_path} not found, continuing")
32
+ dsym_path = nil
33
+ end
79
34
  end
80
35
 
36
+ binary_path = File.join(framework_path, @framework_name)
37
+ raise AppError.new, "Binary #{binary_path} is missing, failed to read .bcsymbolmap files" unless File.exist?(binary_path)
38
+
39
+ bcsymbolmap_paths = find_bcsymbolmap_paths(shell, platform_path, binary_path)
40
+
41
+ input_paths = []
42
+ input_paths << framework_path
43
+ input_paths << dsym_path unless dsym_path.nil?
44
+ input_paths += bcsymbolmap_paths
45
+
46
+ $LOG.debug("Adding > #{input_paths.inspect}")
47
+
48
+ delete_archive
49
+ shell.archive(input_paths, @archive_path)
50
+ $LOG.debug("Created #{@archive_path} archive, file size: #{formatted_archive_size}")
51
+ end
52
+
53
+ def unpack_archive(shell)
54
+ raise AppError.new, "Archive #{@archive_path} is missing" unless File.exist?(@archive_path)
55
+ $LOG.debug("Unpacking #{@archive_path}, file size: #{formatted_archive_size}")
56
+ shell.unpack(@archive_path)
57
+ end
58
+
59
+ def delete_archive
60
+ File.delete(@archive_path) if File.exist?(@archive_path)
61
+ end
62
+
63
+ def archive_size
64
+ raise AppError.new, "Archive #{@archive_path} is missing" unless File.exist?(@archive_path)
65
+ File.size(@archive_path)
66
+ end
67
+
68
+ private
69
+
70
+ def find_bcsymbolmap_paths(shell, platform_path, binary_path)
71
+ raw_dwarfdump = shell.dwarfdump(binary_path)
72
+ uuids = parse_uuids(raw_dwarfdump)
73
+ bcsymbolmap_paths = uuids.map { |uuid| File.join(platform_path, "#{uuid}.bcsymbolmap") }.select { |path| File.exist?(path) }
74
+ bcsymbolmap_paths
75
+ end
76
+
77
+ # Example dwarfdump link:
78
+ # UUID: 618BEB79-4C7F-3692-B140-131FB983AC5E (i386) Carthage/Build/iOS/CocoaLumberjackSwift.framework/CocoaLumberjackSwift
79
+ def parse_uuids(raw_dwarfdump)
80
+ lines = raw_dwarfdump.split("\n")
81
+ uuids = lines.map { |line| line[/^UUID: ([A-Z0-9\-]+)\s+\(.*$/, 1] }
82
+ uuids.compact
83
+ end
84
+
85
+ def formatted_archive_size
86
+ format_file_size(archive_size)
87
+ end
81
88
  end
@@ -1,65 +1,89 @@
1
+ # Representation of a Cartfile.resolved entry.
2
+ # @see https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#origin
1
3
  class CarthageDependency
2
-
3
- class << self
4
- # Parses Cartfile.resolved dependency entry, e.g.
5
- # github "CocoaLumberjack/CocoaLumberjack" "3.2.1"
6
- def parse_cartfile_resolved_line(line)
7
- line.strip!
8
- matches = line.match(/^(\w+)\s+\"([^\"]+)\"(\s+\"([^\"]+)\")$/)
9
- return nil if matches.nil?
10
- if matches.length == 5
11
- CarthageDependency.new(type: matches[1], repository: matches[2], version: matches[4])
12
- else
13
- nil
14
- end
15
- end
4
+ class << self
5
+ # Parses Cartfile.resolved dependency entry, e.g.
6
+ # github "CocoaLumberjack/CocoaLumberjack" "3.2.1"
7
+ def parse_cartfile_resolved_line(line)
8
+ line.strip!
9
+ matches = line.match(/^(\w+)\s+\"([^\"]+)\"(\s+\"([^\"]+)\")$/)
10
+ return nil if matches.nil?
11
+ if matches.length == 5
12
+ CarthageDependency.new(origin: matches[1].to_sym, source: matches[2], version: matches[4])
13
+ else
14
+ nil
15
+ end
16
16
  end
17
+ end
17
18
 
18
- attr_reader :type, :repository, :version
19
+ attr_reader :origin, :source, :version
19
20
 
20
- def initialize(args)
21
- @type = args[:type]
22
- @repository = args[:repository]
23
- @version = args[:version]
24
- end
21
+ def initialize(args)
22
+ raise AppError.new, "Expected Symbol for origin '#{args[:origin]}'" unless args[:origin].kind_of? Symbol
23
+ raise AppError.new, "Unrecognized origin '#{args[:oriign]}'" unless [:github, :git, :binary].include?(args[:origin])
25
24
 
26
- # Since one Cartfile.resolved entry may produce multiple differently named frameworks,
27
- # this is an entry point to identifying a framework name.
28
- def guessed_framework_basename
29
- case @type
30
- when "github"
31
- repository.split("/").last
32
- else
33
- raise AppError.new, "Determining version_filename from #{@type} dependency is not yet supported"
34
- end
35
- end
25
+ @origin = args[:origin]
26
+ @source = args[:source]
27
+ @version = args[:version]
28
+ end
36
29
 
37
- def version_filename
38
- ".#{guessed_framework_basename}.version"
30
+ # Since one Cartfile.resolved entry may produce multiple differently named frameworks,
31
+ # this is an entry point to identifying a framework name.
32
+ def guessed_framework_basename
33
+ case @origin
34
+ when :github
35
+ @source.split("/").last
36
+ when :git
37
+ filename = @source.split("/").last
38
+ filename.chomp(".git")
39
+ when :binary
40
+ filename = @source.split("/").last
41
+ filename.chomp(".json")
42
+ else
43
+ raise AppError.new, "Unrecognized origin '#{@origin}'"
39
44
  end
45
+ end
40
46
 
41
- def version_filepath
42
- File.join(CARTHAGE_BUILD_DIR, version_filename)
43
- end
47
+ def version_filename
48
+ ".#{guessed_framework_basename}.version"
49
+ end
50
+
51
+ def version_filepath
52
+ File.join(CARTHAGE_BUILD_DIR, version_filename)
53
+ end
44
54
 
45
- def validate_version_file(version_file)
46
- raise OutdatedFrameworkBuildError.new, version_validation_message(version_file) if @version != version_file.version
55
+ def should_include_dsym
56
+ case @origin
57
+ when :github
58
+ true
59
+ when :git
60
+ true
61
+ when :binary
62
+ false
63
+ else
64
+ raise AppError.new, "Unrecognized origin '#{@origin}'"
47
65
  end
66
+ end
48
67
 
49
- def to_s
50
- "#{@type} \"#{@repository}\" \"#{@version}\""
68
+ def validate_version_file(version_file)
69
+ if @version != version_file.version
70
+ raise OutdatedFrameworkBuildError.new, version_validation_message(version_file)
51
71
  end
72
+ end
52
73
 
53
- private
74
+ def to_s
75
+ "#{@origin.to_s} \"#{@source}\" \"#{@version}\""
76
+ end
54
77
 
55
- def version_validation_message(version_file)
56
- <<~EOS
57
- Outdated version of '#{guessed_framework_basename}' framework detected:
58
- Expected version '#{@version}'
59
- Found version '#{version_file.version}'
78
+ private
60
79
 
61
- Please run `carthage bootstrap` to build frameworks.
62
- EOS
63
- end
80
+ def version_validation_message(version_file)
81
+ <<~EOS
82
+ Outdated version of '#{guessed_framework_basename}' framework detected:
83
+ Expected version '#{@version}'
84
+ Found version '#{version_file.version}'
64
85
 
86
+ Please run `carthage bootstrap` to build frameworks.
87
+ EOS
88
+ end
65
89
  end
@@ -9,5 +9,7 @@ require 'configuration'
9
9
  require 'errors'
10
10
  require 'log'
11
11
  require 'networking'
12
+ require 'shell_wrapper'
12
13
  require 'utils'
14
+ require 'version'
13
15
  require 'version_file'
@@ -1,67 +1,85 @@
1
1
  require 'concurrent'
2
2
 
3
3
  class DownloadCommand
4
+ def self.new_with_defaults(options)
5
+ shell = ShellWrapper.new
6
+ config = Configuration.new(shell)
7
+ networking = Networking.new(config)
8
+ api = API.new(shell, networking, options)
4
9
 
5
- def initialize(options)
6
- @options = options
7
- @config = Configuration.new
8
- @networking = Networking.new(@config)
9
- @api = API.new(@networking, options)
10
- end
10
+ DownloadCommand.new(
11
+ config: config,
12
+ networking: networking,
13
+ api: api,
14
+ )
15
+ end
16
+
17
+ def initialize(args)
18
+ @config = args[:config]
19
+ @networking = args[:networking]
20
+ @api = args[:api]
21
+ end
11
22
 
12
- def run
13
- pool = Concurrent::FixedThreadPool.new(THREAD_POOL_SIZE)
23
+ def run
24
+ pool = Concurrent::FixedThreadPool.new(THREAD_POOL_SIZE)
14
25
 
15
- @number_of_downloaded_archives = 0
16
- @number_of_skipped_archives = 0
17
- errors = Concurrent::Array.new
26
+ @number_of_downloaded_archives = 0
27
+ @number_of_skipped_archives = 0
28
+ @total_archive_size = 0
29
+ errors = Concurrent::Array.new
18
30
 
19
- for carthage_dependency in @config.carthage_dependencies
20
- pool.post(carthage_dependency) do |carthage_dependency|
21
- begin
22
- download(carthage_dependency)
23
- rescue => e
24
- errors << e
25
- end
26
- end
31
+ for carthage_dependency in @config.carthage_dependencies
32
+ pool.post(carthage_dependency) do |carthage_dependency|
33
+ begin
34
+ download(carthage_dependency)
35
+ rescue => e
36
+ errors << e
27
37
  end
38
+ end
39
+ end
28
40
 
29
- pool.shutdown
30
- pool.wait_for_termination
41
+ pool.shutdown
42
+ pool.wait_for_termination
31
43
 
32
- if errors.count > 0
33
- raise MultipleErrorsError.new(errors)
34
- else
35
- puts "Downloaded and extracted #{@number_of_downloaded_archives} archives, skipped #{@number_of_skipped_archives} archives."
36
- end
44
+ if errors.count > 0
45
+ raise MultipleErrorsError.new(errors)
46
+ else
47
+ puts "Downloaded and extracted #{@number_of_downloaded_archives} archives " +
48
+ "(#{format_file_size(@total_archive_size)}), " +
49
+ "skipped #{@number_of_skipped_archives} archives."
37
50
  end
51
+ end
38
52
 
39
- private
53
+ private
40
54
 
41
- def download(carthage_dependency)
42
- local_version_file = if File.exist?(carthage_dependency.version_filepath)
43
- VersionFile.new(carthage_dependency.version_filepath)
44
- else
45
- nil
46
- end
55
+ def download(carthage_dependency)
56
+ local_version_file =
57
+ if File.exist?(carthage_dependency.version_filepath)
58
+ VersionFile.new(carthage_dependency.version_filepath)
59
+ else
60
+ nil
61
+ end
47
62
 
48
- if !local_version_file.nil? && @api.version_file_matches_server?(carthage_dependency, local_version_file)
49
- $LOG.debug("Version file #{local_version_file.path} matches server version, skipping download")
50
- @number_of_skipped_archives += local_version_file.number_of_frameworks
51
- return
52
- end
63
+ if !local_version_file.nil? && @api.version_file_matches_server?(carthage_dependency, local_version_file)
64
+ $LOG.debug("Version file #{local_version_file.path} matches server version, skipping download")
65
+ @number_of_skipped_archives += local_version_file.number_of_frameworks
66
+ return
67
+ end
53
68
 
54
- version_file = @networking.download_version_file(carthage_dependency)
55
- raise AppError.new, "Version file #{carthage_dependency.version_filename} is not present on the server, please run `carthagerc upload` first" if version_file.nil?
69
+ version_file = @networking.download_version_file(carthage_dependency)
70
+ raise AppError.new, "Version file #{carthage_dependency.version_filename} is not present on the server, please run `carthagerc upload` first" if version_file.nil?
56
71
 
57
- version_file.frameworks_by_platform.each do |platform, framework_names|
58
- for framework_name in framework_names do
59
- archive = @api.download_and_unpack_archive(carthage_dependency, framework_name, platform)
60
- raise AppError.new, "Failed to download framework #{carthage_dependency} – #{framework_name} (#{platform}). Please `upload` the framework first." if archive.nil?
61
- @number_of_downloaded_archives += 1
62
- end
72
+ version_file.frameworks_by_platform.each do |platform, framework_names|
73
+ for framework_name in framework_names
74
+ archive_size = @api.download_and_unpack_archive(carthage_dependency, framework_name, platform)
75
+ if archive_size.nil?
76
+ raise AppError.new, "Failed to download framework #{carthage_dependency} – #{framework_name} (#{platform}). Please `upload` the framework first."
77
+ else
78
+ @number_of_downloaded_archives += 1
79
+ @total_archive_size += archive_size
63
80
  end
64
- version_file.move_to_build_dir
81
+ end
65
82
  end
66
-
83
+ version_file.move_to_build_dir
84
+ end
67
85
  end
@@ -1,26 +1,24 @@
1
1
  class InitCommand
2
+ def initialize(options)
3
+ @options = options
4
+ end
2
5
 
3
- def initialize(options)
4
- @options = options
6
+ def run
7
+ path = File.join(Dir.pwd, CARTRCFILE)
8
+ if File.exist?(path)
9
+ raise AppError.new, "File #{path} already exists"
10
+ else
11
+ File.write(path, file_contents)
5
12
  end
13
+ end
6
14
 
7
- def run
8
- path = File.join(Dir.pwd, CARTRCFILE)
9
- if File.exist?(path)
10
- raise AppError.new, "File #{path} already exists"
11
- else
12
- File.write(path, file_contents)
13
- end
14
- end
15
-
16
- private
17
-
18
- def file_contents
19
- <<~EOS
20
- Configuration.setup do |c|
21
- c.server = "http://localhost:#{SERVER_DEFAULT_PORT}/"
22
- end
23
- EOS
24
- end
15
+ private
25
16
 
17
+ def file_contents
18
+ <<~EOS
19
+ Configuration.setup do |c|
20
+ c.server = "http://localhost:#{SERVER_DEFAULT_PORT}/"
21
+ end
22
+ EOS
23
+ end
26
24
  end
@@ -1,16 +1,14 @@
1
1
  class ServerCommand
2
+ def initialize(options)
3
+ @options = options
4
+ end
2
5
 
3
- def initialize(options)
4
- @options = options
5
- end
6
-
7
- def run
8
- ENV['RACK_ENV'] = 'production'
9
- require 'server/server_app'
10
- Rack::Handler::WEBrick.run(
11
- Sinatra::Application,
12
- :Port => @options[:server_port]
13
- )
14
- end
15
-
6
+ def run
7
+ ENV['RACK_ENV'] = 'production'
8
+ require 'server/server_app'
9
+ Rack::Handler::WEBrick.run(
10
+ Sinatra::Application,
11
+ :Port => @options[:server_port],
12
+ )
13
+ end
16
14
  end
@@ -1,63 +1,78 @@
1
1
  require 'concurrent'
2
2
 
3
3
  class UploadCommand
4
+ def self.new_with_defaults(options)
5
+ shell = ShellWrapper.new
6
+ config = Configuration.new(shell)
7
+ networking = Networking.new(config)
8
+ api = API.new(shell, networking, options)
4
9
 
5
- def initialize(options)
6
- @config = Configuration.new
7
- @networking = Networking.new(@config)
8
- @api = API.new(@networking, options)
9
- end
10
-
11
- def run
12
- pool = Concurrent::FixedThreadPool.new(THREAD_POOL_SIZE)
10
+ UploadCommand.new(
11
+ config: config,
12
+ networking: networking,
13
+ api: api,
14
+ )
15
+ end
13
16
 
14
- $LOG.debug("Will upload frameworks: #{@config.all_framework_names}")
17
+ def initialize(args)
18
+ @config = args[:config]
19
+ @networking = args[:networking]
20
+ @api = args[:api]
21
+ end
15
22
 
16
- @number_of_uploaded_archives = 0
17
- @number_of_skipped_archives = 0
18
- errors = Concurrent::Array.new
23
+ def run
24
+ pool = Concurrent::FixedThreadPool.new(THREAD_POOL_SIZE)
19
25
 
20
- for carthage_dependency in @config.carthage_dependencies
21
- pool.post(carthage_dependency) do |carthage_dependency|
22
- begin
23
- upload(carthage_dependency)
24
- rescue => e
25
- errors << e
26
- end
27
- end
28
- end
26
+ $LOG.debug("Will upload frameworks: #{@config.all_framework_names}")
29
27
 
30
- pool.shutdown
31
- pool.wait_for_termination
28
+ @number_of_uploaded_archives = 0
29
+ @number_of_skipped_archives = 0
30
+ @total_archive_size = 0
31
+ errors = Concurrent::Array.new
32
32
 
33
- if errors.count > 0
34
- raise MultipleErrorsError.new(errors)
35
- else
36
- puts "Uploaded #{@number_of_uploaded_archives} archives, skipped #{@number_of_skipped_archives}."
33
+ for carthage_dependency in @config.carthage_dependencies
34
+ pool.post(carthage_dependency) do |carthage_dependency|
35
+ begin
36
+ upload(carthage_dependency)
37
+ rescue => e
38
+ errors << e
37
39
  end
40
+ end
38
41
  end
39
42
 
40
- private
43
+ pool.shutdown
44
+ pool.wait_for_termination
41
45
 
42
- def upload(carthage_dependency)
43
- version_file = VersionFile.new(carthage_dependency.version_filepath)
46
+ if errors.count > 0
47
+ raise MultipleErrorsError.new(errors)
48
+ else
49
+ puts "Uploaded #{@number_of_uploaded_archives} archives " +
50
+ "(#{format_file_size(@total_archive_size)}), " +
51
+ "skipped #{@number_of_skipped_archives}."
52
+ end
53
+ end
44
54
 
45
- carthage_dependency.validate_version_file(version_file)
55
+ private
46
56
 
47
- if @api.version_file_matches_server?(carthage_dependency, version_file)
48
- $LOG.debug("Version file #{version_file.path} matches server version, skipping upload")
49
- @number_of_skipped_archives += version_file.number_of_frameworks
50
- return
51
- end
57
+ def upload(carthage_dependency)
58
+ version_file = VersionFile.new(carthage_dependency.version_filepath)
52
59
 
53
- @networking.upload_version_file(carthage_dependency)
60
+ carthage_dependency.validate_version_file(version_file)
54
61
 
55
- version_file.frameworks_by_platform.each do |platform, framework_names|
56
- for framework_name in framework_names
57
- @api.create_and_upload_archive(carthage_dependency, framework_name, platform)
58
- @number_of_uploaded_archives += 1
59
- end
60
- end
62
+ if @api.version_file_matches_server?(carthage_dependency, version_file)
63
+ $LOG.debug("Version file #{version_file.path} matches server version, skipping upload")
64
+ @number_of_skipped_archives += version_file.number_of_frameworks
65
+ return
61
66
  end
62
67
 
68
+ @networking.upload_version_file(carthage_dependency)
69
+
70
+ version_file.frameworks_by_platform.each do |platform, framework_names|
71
+ for framework_name in framework_names
72
+ archive_size = @api.create_and_upload_archive(carthage_dependency, framework_name, platform)
73
+ @number_of_uploaded_archives += 1
74
+ @total_archive_size += archive_size
75
+ end
76
+ end
77
+ end
63
78
  end