fastlane_core 0.17.1 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5692cce90b737af822e5f7d5c6f181d93b56a694
|
4
|
+
data.tar.gz: c2b5cd21d3fd8ab15536b67c607f45a42f9155f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 696adb690deab891009a1f7a939df68b30260f65c1fbd80b4177858a856b721448d535234b322d9e2bb498bd8c4f84a9f2948303059951361d65c7b1d4e4bec2
|
7
|
+
data.tar.gz: 3ff6ad23325ba6a978b88a7fb4f959da0145a6550e8ddd00f9656a0c775efdd489dba9463d18aa343daeff2bb1d34f5adf95d711ebb238352ba5640ae2c355d3
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<package xmlns="http://apple.com/itunes/importer" version="software4.7">
|
3
|
+
<software_assets apple_id="<%= @data[:apple_id] %>">
|
4
|
+
<asset type="bundle">
|
5
|
+
<data_file>
|
6
|
+
<size><%= @data[:file_size] %></size>
|
7
|
+
<file_name><%= @data[:ipa_path] %></file_name>
|
8
|
+
<checksum type="md5"><%= @data[:md5] %></checksum>
|
9
|
+
</data_file>
|
10
|
+
</asset>
|
11
|
+
</software_assets>
|
12
|
+
</package>
|
data/lib/fastlane_core.rb
CHANGED
@@ -10,6 +10,7 @@ require 'fastlane_core/ipa_file_analyser'
|
|
10
10
|
require 'fastlane_core/itunes_transporter'
|
11
11
|
require 'fastlane_core/provisioning_profile'
|
12
12
|
require 'fastlane_core/command_executor'
|
13
|
+
require 'fastlane_core/ipa_upload_package_builder'
|
13
14
|
|
14
15
|
# Third Party code
|
15
16
|
require 'colored'
|
@@ -13,20 +13,21 @@ module FastlaneCore
|
|
13
13
|
options.each do |option|
|
14
14
|
appendix = (option.is_string ? "STRING" : "")
|
15
15
|
type = (option.is_string ? String : nil)
|
16
|
-
short_option = option.short_option
|
16
|
+
short_option = option.short_option
|
17
17
|
|
18
18
|
raise "Short option #{short_option} already taken for key #{option.key}".red if short_codes.include? short_option
|
19
19
|
raise "-v is already used for the version (key #{option.key})".red if short_option == "-v"
|
20
20
|
raise "-h is already used for the help screen (key #{option.key})".red if short_option == "-h"
|
21
21
|
raise "-t is already used for the trace screen (key #{option.key})".red if short_option == "-t"
|
22
22
|
|
23
|
-
short_codes << short_option
|
23
|
+
short_codes << short_option if short_option
|
24
24
|
|
25
25
|
# Example Call
|
26
26
|
# c.option '-p', '--pattern STRING', String, 'Description'
|
27
27
|
|
28
28
|
flag = "--#{option.key} #{appendix}"
|
29
|
-
description =
|
29
|
+
description = option.description
|
30
|
+
description += " (#{option.env_name})" if option.env_name.to_s.length > 0
|
30
31
|
|
31
32
|
global_option short_option, flag, type, description
|
32
33
|
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require "digest/md5"
|
2
|
+
|
3
|
+
module FastlaneCore
|
4
|
+
# Builds a package for the binary ready to be uploaded with the iTunes Transporter
|
5
|
+
class IpaUploadPackageBuilder
|
6
|
+
METADATA_FILE_NAME = "metadata.xml"
|
7
|
+
|
8
|
+
attr_accessor :package_path
|
9
|
+
|
10
|
+
def generate(app_id: nil, ipa_path: nil, package_path: nil)
|
11
|
+
self.package_path = File.join(package_path, "#{app_id}.itmsp")
|
12
|
+
FileUtils.rm_rf self.package_path if File.directory?(self.package_path)
|
13
|
+
FileUtils.mkdir_p self.package_path
|
14
|
+
|
15
|
+
lib_path = Helper.gem_path("fastlane_core")
|
16
|
+
|
17
|
+
ipa_path = copy_ipa(ipa_path)
|
18
|
+
@data = {
|
19
|
+
apple_id: app_id,
|
20
|
+
file_size: File.size(ipa_path),
|
21
|
+
ipa_path: File.basename(ipa_path), # this is only the base name as the ipa is inside the package
|
22
|
+
md5: Digest::MD5.hexdigest(File.read(ipa_path))
|
23
|
+
}
|
24
|
+
|
25
|
+
xml_path = File.join(lib_path, "lib/assets/XMLTemplate.xml.erb")
|
26
|
+
xml = ERB.new(File.read(xml_path)).result(binding) # http://www.rrn.dk/rubys-erb-templating-system
|
27
|
+
|
28
|
+
File.write(File.join(self.package_path, METADATA_FILE_NAME), xml)
|
29
|
+
Helper.log.info "Wrote XML data to '#{self.package_path}'".green if $verbose
|
30
|
+
|
31
|
+
return package_path
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def copy_ipa(ipa_path)
|
37
|
+
ipa_file_name = Digest::MD5.hexdigest(ipa_path)
|
38
|
+
resulting_path = File.join(self.package_path, "#{ipa_file_name}.ipa")
|
39
|
+
FileUtils.cp(ipa_path, resulting_path)
|
40
|
+
|
41
|
+
return resulting_path
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -305,6 +305,7 @@ extra_rdoc_files: []
|
|
305
305
|
files:
|
306
306
|
- LICENSE
|
307
307
|
- README.md
|
308
|
+
- lib/assets/XMLTemplate.xml.erb
|
308
309
|
- lib/fastlane_core.rb
|
309
310
|
- lib/fastlane_core/cert_checker.rb
|
310
311
|
- lib/fastlane_core/command_executor.rb
|
@@ -314,6 +315,7 @@ files:
|
|
314
315
|
- lib/fastlane_core/configuration/configuration_file.rb
|
315
316
|
- lib/fastlane_core/helper.rb
|
316
317
|
- lib/fastlane_core/ipa_file_analyser.rb
|
318
|
+
- lib/fastlane_core/ipa_upload_package_builder.rb
|
317
319
|
- lib/fastlane_core/itunes_connect/itunes_connect.rb
|
318
320
|
- lib/fastlane_core/itunes_connect/itunes_connect_apple_id.rb
|
319
321
|
- lib/fastlane_core/itunes_connect/itunes_connect_helper.rb
|
@@ -344,7 +346,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
344
346
|
version: '0'
|
345
347
|
requirements: []
|
346
348
|
rubyforge_project:
|
347
|
-
rubygems_version: 2.4.
|
349
|
+
rubygems_version: 2.4.6
|
348
350
|
signing_key:
|
349
351
|
specification_version: 4
|
350
352
|
summary: Contains all shared code/dependencies of the fastlane.tools
|