fastlane 1.27.0 → 1.28.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: 6ca78ddda11ac15341e1c44f7dd3f837acc56afe
4
- data.tar.gz: 699ec3ba81ef637af439b04cad7ddc981e6f6e79
3
+ metadata.gz: 801fcf882415279031545480f46097c3af458ae2
4
+ data.tar.gz: 8c7f3068f19f4e20035ff95a976bef494b8ebb68
5
5
  SHA512:
6
- metadata.gz: 3fd5456248d1d5a955315e035d60367012ab8cbe5c8469b653a337c5dd2db0e838b088ef5f365b03213d930ecc32f74eb72492fd461f12eebc22c93df1119ba1
7
- data.tar.gz: b7e0196d7f2703133ac5a80bbfb9fdad537c13ff379b878df9b08b766a74734565f848eaed05fc549ddf6593353def1f7b50174f471dccc6386143ccfe660efe
6
+ metadata.gz: bd5cc1c1c89af9a374654f55a70bd9bf948fa79b0a3c6ab224fe0770a2908cf00b54fca83f8ccf3c2342e2132d3fba5c8b5ced7b9f75135b61e0336c35f7c078
7
+ data.tar.gz: 797bf7f700e41fd277431217c5622e661d138db797272f92b3cb2b2a801b6ecbcdf20826ef743d96701b58a59cdc8d36c2f559a4b94b9950f49d5d10d46982bf
@@ -1,64 +1,37 @@
1
- # Workaround, since crashlytics.rb from shenzhen includes the code for commander.
2
- def command(_param)
3
- end
4
-
5
1
  module Fastlane
6
2
  module Actions
7
3
  class CrashlyticsAction < Action
8
-
9
- def self.is_supported?(platform)
10
- [:ios, :mac].include? platform
11
- end
12
-
13
4
  def self.run(params)
14
- require 'shenzhen'
15
- require 'shenzhen/plugins/crashlytics'
5
+ Helper.log.info 'Uploading the IPA to Crashlytics Beta. Time for some ☕️.'.green
16
6
 
17
- # can pass groups param either as an Array or a String
18
- case params[:groups]
19
- when NilClass
20
- groups = nil
21
- when Array
22
- groups = params[:groups].join(',')
23
- when String
24
- groups = params[:groups]
25
- end
7
+ params[:groups] = params[:groups].join(",") if params[:groups].kind_of?(Array)
8
+ params[:emails] = params[:emails].join(",") if params[:emails].kind_of?(Array)
26
9
 
27
- # Normalized notification to Crashlytics notification parameter requirement
28
- # 'YES' or 'NO' - String
29
- case params[:notifications]
30
- when String
31
- if params[:notifications] == 'YES' || params[:notifications] == 'NO'
32
- notifications = params[:notifications]
33
- else
34
- notifications = 'YES' if params[:notifications] == 'true'
35
- notifications = 'NO' if params[:notifications] == 'false'
36
- end
37
- when TrueClass
38
- notifications = 'YES'
39
- when FalseClass
40
- notifications = 'NO'
41
- else
42
- notifications = nil
43
- end
10
+ if params[:notes]
11
+ # We need to store it in a file, because the crashlytics CLI says so
12
+ Helper.log.error "Overwriting :notes_path, because you specified :notes" if params[:notes_path]
44
13
 
45
- Helper.log.info 'Uploading the IPA to Crashlytics. Go for a coffee ☕️.'.green
46
-
47
- if Helper.test?
48
- # Access all values, to do the verify
49
- return params[:crashlytics_path], params[:api_token], params[:build_secret], params[:ipa_path], params[:build_secret], params[:ipa_path], params[:notes_path], params[:emails], groups, notifications
14
+ notes_path = File.join("/tmp", "#{Time.now.to_i}_changelog.txt")
15
+ File.write(notes_path, params[:notes])
16
+ params[:notes_path] = notes_path # we can only set it *after* writing the file there
50
17
  end
51
18
 
52
- client = Shenzhen::Plugins::Crashlytics::Client.new(params[:crashlytics_path], params[:api_token], params[:build_secret])
19
+ command = []
20
+ command << File.join(params[:crashlytics_path], 'submit')
21
+ command << params[:api_token]
22
+ command << params[:build_secret]
23
+ command << "-ipaPath '#{params[:ipa_path]}'"
24
+ command << "-emails '#{params[:emails]}'" if params[:emails]
25
+ command << "-notesPath '#{params[:notes_path]}'" if params[:notes_path]
26
+ command << "-groupAliases '#{params[:groups]}'" if params[:groups]
27
+ command << "-notifications #{(params[:notifications] ? 'YES' : 'NO')}"
53
28
 
54
- response = client.upload_build(params[:ipa_path], file: params[:ipa_path], notes: params[:notes_path], emails: params[:emails], groups: groups, notifications: notifications)
29
+ Helper.log.debug command.join(" ") if $verbose
30
+ Actions.sh command.join(" ")
55
31
 
56
- if response
57
- Helper.log.info 'Build successfully uploaded to Crashlytics'.green
58
- else
59
- Helper.log.fatal 'Error uploading to Crashlytics.'
60
- raise 'Error when trying to upload ipa to Crashlytics'.red
61
- end
32
+ return command if Helper.test?
33
+
34
+ Helper.log.info 'Build successfully uploaded to Crashlytics Beta 🌷'.green
62
35
  end
63
36
 
64
37
  def self.description
@@ -70,6 +43,7 @@ module Fastlane
70
43
  FastlaneCore::ConfigItem.new(key: :crashlytics_path,
71
44
  env_name: "CRASHLYTICS_FRAMEWORK_PATH",
72
45
  description: "Path to the submit binary in the Crashlytics bundle",
46
+ default_value: Dir["./Pods/Crashlytics/Crashlytics.framework"].last,
73
47
  verify_block: proc do |value|
74
48
  raise "No Crashlytics path given or found, pass using `crashlytics_path: 'path'`".red unless File.exist?(value)
75
49
  end),
@@ -88,7 +62,7 @@ module Fastlane
88
62
  FastlaneCore::ConfigItem.new(key: :ipa_path,
89
63
  env_name: "CRASHLYTICS_IPA_PATH",
90
64
  description: "Path to your IPA file. Optional if you use the `ipa` or `xcodebuild` action",
91
- default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
65
+ default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] || Dir["*.ipa"].last,
92
66
  verify_block: proc do |value|
93
67
  raise "Couldn't find ipa file at path '#{value}'".red unless File.exist?(value)
94
68
  end),
@@ -99,28 +73,35 @@ module Fastlane
99
73
  verify_block: proc do |value|
100
74
  raise "Path '#{value}' not found".red unless File.exist?(value)
101
75
  end),
76
+ FastlaneCore::ConfigItem.new(key: :notes,
77
+ env_name: "CRASHLYTICS_NOTES",
78
+ description: "The release notes as string - uses :notes_path under the hood",
79
+ optional: true,
80
+ is_string: true),
102
81
  FastlaneCore::ConfigItem.new(key: :groups,
103
82
  env_name: "CRASHLYTICS_GROUPS",
104
- description: "The groups used for distribution",
83
+ description: "The groups used for distribution, separated by commas",
105
84
  optional: true,
106
85
  is_string: false),
107
86
  FastlaneCore::ConfigItem.new(key: :emails,
108
87
  env_name: "CRASHLYTICS_EMAILS",
109
- description: "Pass email addresses, separated by commas",
110
- optional: true),
88
+ description: "Pass email addresses of testers, separated by commas",
89
+ optional: true,
90
+ is_string: false),
111
91
  FastlaneCore::ConfigItem.new(key: :notifications,
112
92
  env_name: "CRASHLYTICS_NOTIFICATIONS",
113
93
  description: "Crashlytics notification option (true/false)",
114
- optional: true,
115
- is_string: false,
116
- verify_block: proc do |value|
117
- raise "Crashlytics supported notifications options: TrueClass, FalseClass, 'true', 'false', 'YES', 'NO'".red unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass) || value.kind_of?(String)
118
- end)
94
+ default_value: true,
95
+ is_string: false)
119
96
  ]
120
97
  end
121
98
 
99
+ def self.is_supported?(platform)
100
+ [:ios, :mac].include?(platform)
101
+ end
102
+
122
103
  def self.author
123
- "pedrogimenez"
104
+ ["KrauseFx", "pedrogimenez"]
124
105
  end
125
106
  end
126
107
  end
@@ -14,7 +14,7 @@ module Fastlane
14
14
  user_input = STDIN.gets(end_tag).chomp.gsub(end_tag, "").strip
15
15
  else
16
16
  # Standard one line input
17
- user_input = STDIN.gets.chomp.strip
17
+ user_input = STDIN.gets.chomp.strip while (user_input || "").length == 0
18
18
  end
19
19
 
20
20
  user_input = (user_input.downcase == 'y') if params[:boolean]
@@ -18,8 +18,8 @@ module Fastlane
18
18
  'tag_name' => params[:tag_name],
19
19
  'name' => params[:name],
20
20
  'body' => params[:description],
21
- 'draft' => params[:is_draft],
22
- 'prerelease' => params[:is_prerelease]
21
+ 'draft' => !!params[:is_draft],
22
+ 'prerelease' => !!params[:is_prerelease]
23
23
  }
24
24
  body_obj['target_commitish'] = params[:commitish] if params[:commitish]
25
25
  body = body_obj.to_json
@@ -43,7 +43,6 @@ module Fastlane
43
43
 
44
44
  assets = params[:upload_assets]
45
45
  if assets && assets.count > 0
46
-
47
46
  # upload assets
48
47
  self.upload_assets(assets, body['upload_url'], api_token)
49
48
 
@@ -62,10 +61,13 @@ module Fastlane
62
61
  return body
63
62
  end
64
63
  when 422
64
+ Helper.log.error response.body
65
65
  Helper.log.error "Release on tag #{params[:tag_name]} already exists!".red
66
66
  when 404
67
+ Helper.log.error response.body
67
68
  raise "Repository #{params[:repository_name]} cannot be found, please double check its name and that you provided a valid API token (if it's a private repository).".red
68
69
  when 401
70
+ Helper.log.error response.body
69
71
  raise "You are not authorized to access #{params[:repository_name]}, please make sure you provided a valid API token.".red
70
72
  else
71
73
  if response[:status] != 200
@@ -0,0 +1,98 @@
1
+ module Fastlane
2
+ module Actions
3
+ module SharedValues
4
+ end
5
+
6
+ class VerifyXcodeAction < Action
7
+ def self.run(params)
8
+ Helper.log.info "Verifying your Xcode installation at path '#{params[:xcode_path]}'...".green
9
+
10
+ # Check 1/2
11
+
12
+ Helper.log.info "Verifying Xcode was signed by Apple Inc.".green
13
+ command = "codesign --display --verbose=4 '#{params[:xcode_path]}'"
14
+
15
+ must_includes = [
16
+ "Identifier=com.apple.dt.Xcode",
17
+ "Authority=Apple Mac OS Application Signing",
18
+ "Authority=Apple Worldwide Developer Relations Certification Authority",
19
+ "Authority=Apple Root CA",
20
+ "TeamIdentifier=59GAB85EFG"
21
+ ]
22
+
23
+ verify(command: command, must_includes: must_includes, params: params)
24
+
25
+ Helper.log.info "Successfully verified the code signature".green
26
+
27
+ # Check 2/2
28
+
29
+ Helper.log.info "Verifying the signature of Xcode...".green
30
+ Helper.log.info "This will take up to a few minutes, now is a great time to go for a coffee ☕...".green
31
+ command = "codesign --verify --deep --verbose '#{params[:xcode_path]}'"
32
+
33
+ must_includes = [
34
+ "valid on disk",
35
+ "satisfies its Designated Requirement"
36
+ ]
37
+
38
+ verify(command: command, must_includes: must_includes, params: params)
39
+
40
+ Helper.log.info "Successfully verified Xcode installation at path '#{params[:xcode_path]}' 🎧".green
41
+ end
42
+
43
+ def self.verify(command: nil, must_includes: nil, params: nil)
44
+ output = Actions.sh(command)
45
+
46
+ errors = []
47
+ must_includes.each do |current|
48
+ next if output.include?(current)
49
+ errors << current
50
+ end
51
+
52
+ if errors.count > 0
53
+ Helper.log.fatal "Attention: Your Xcode Installation might be hacked.".red
54
+ Helper.log.fatal "This might be a false alarm, if so, please submit an issue on GitHub".red
55
+ Helper.log.fatal "The following information couldn't be found:".red
56
+ Helper.log.fatal errors.join("\n").yellow
57
+ raise "The Xcode installation at path '#{params[:xcode_path]}' might be compromised."
58
+ end
59
+ end
60
+
61
+ #####################################################
62
+ # @!group Documentation
63
+ #####################################################
64
+
65
+ def self.description
66
+ "Verifies that the Xcode installation is properly signed by Apple"
67
+ end
68
+
69
+ def self.details
70
+ [
71
+ "This action was implemented after the recent Xcode attacked to make sure",
72
+ "you're not using a hacked Xcode installation.",
73
+ "http://researchcenter.paloaltonetworks.com/2015/09/novel-malware-xcodeghost-modifies-xcode-infects-apple-ios-apps-and-hits-app-store/"
74
+ ].join("\n")
75
+ end
76
+
77
+ def self.available_options
78
+ [
79
+ FastlaneCore::ConfigItem.new(key: :xcode_path,
80
+ env_name: "FL_VERIFY_XCODE_XCODE_PATH",
81
+ description: "The path to the Xcode installation to test",
82
+ default_value: File.expand_path('../../', FastlaneCore::Helper.xcode_path),
83
+ verify_block: proc do |value|
84
+ raise "Couldn't find Xcode at path '#{value}'".red unless File.exist?(value)
85
+ end)
86
+ ]
87
+ end
88
+
89
+ def self.authors
90
+ ["KrauseFx"]
91
+ end
92
+
93
+ def self.is_supported?(platform)
94
+ [:ios, :mac].include?(platform)
95
+ end
96
+ end
97
+ end
98
+ end
@@ -1,3 +1,3 @@
1
1
  module Fastlane
2
- VERSION = '1.27.0'
2
+ VERSION = '1.28.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.27.0
4
+ version: 1.28.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-18 00:00:00.000000000 Z
11
+ date: 2015-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -190,7 +190,7 @@ dependencies:
190
190
  requirements:
191
191
  - - ">="
192
192
  - !ruby/object:Gem::Version
193
- version: 0.16.2
193
+ version: 0.17.1
194
194
  - - "<"
195
195
  - !ruby/object:Gem::Version
196
196
  version: 1.0.0
@@ -200,7 +200,7 @@ dependencies:
200
200
  requirements:
201
201
  - - ">="
202
202
  - !ruby/object:Gem::Version
203
- version: 0.16.2
203
+ version: 0.17.1
204
204
  - - "<"
205
205
  - !ruby/object:Gem::Version
206
206
  version: 1.0.0
@@ -270,7 +270,7 @@ dependencies:
270
270
  requirements:
271
271
  - - ">="
272
272
  - !ruby/object:Gem::Version
273
- version: 0.9.3
273
+ version: 0.10.0
274
274
  - - "<"
275
275
  - !ruby/object:Gem::Version
276
276
  version: 1.0.0
@@ -280,7 +280,7 @@ dependencies:
280
280
  requirements:
281
281
  - - ">="
282
282
  - !ruby/object:Gem::Version
283
- version: 0.9.3
283
+ version: 0.10.0
284
284
  - - "<"
285
285
  - !ruby/object:Gem::Version
286
286
  version: 1.0.0
@@ -290,7 +290,7 @@ dependencies:
290
290
  requirements:
291
291
  - - ">="
292
292
  - !ruby/object:Gem::Version
293
- version: 2.2.0
293
+ version: 2.2.1
294
294
  - - "<"
295
295
  - !ruby/object:Gem::Version
296
296
  version: 3.0.0
@@ -300,7 +300,7 @@ dependencies:
300
300
  requirements:
301
301
  - - ">="
302
302
  - !ruby/object:Gem::Version
303
- version: 2.2.0
303
+ version: 2.2.1
304
304
  - - "<"
305
305
  - !ruby/object:Gem::Version
306
306
  version: 3.0.0
@@ -390,7 +390,7 @@ dependencies:
390
390
  requirements:
391
391
  - - ">="
392
392
  - !ruby/object:Gem::Version
393
- version: 0.6.2
393
+ version: 0.7.2
394
394
  - - "<"
395
395
  - !ruby/object:Gem::Version
396
396
  version: 1.0.0
@@ -400,7 +400,7 @@ dependencies:
400
400
  requirements:
401
401
  - - ">="
402
402
  - !ruby/object:Gem::Version
403
- version: 0.6.2
403
+ version: 0.7.2
404
404
  - - "<"
405
405
  - !ruby/object:Gem::Version
406
406
  version: 1.0.0
@@ -410,7 +410,7 @@ dependencies:
410
410
  requirements:
411
411
  - - ">="
412
412
  - !ruby/object:Gem::Version
413
- version: 0.1.7
413
+ version: 0.2.0
414
414
  - - "<"
415
415
  - !ruby/object:Gem::Version
416
416
  version: 1.0.0
@@ -420,7 +420,7 @@ dependencies:
420
420
  requirements:
421
421
  - - ">="
422
422
  - !ruby/object:Gem::Version
423
- version: 0.1.7
423
+ version: 0.2.0
424
424
  - - "<"
425
425
  - !ruby/object:Gem::Version
426
426
  version: 1.0.0
@@ -690,6 +690,7 @@ files:
690
690
  - lib/fastlane/actions/update_info_plist.rb
691
691
  - lib/fastlane/actions/update_project_code_signing.rb
692
692
  - lib/fastlane/actions/update_project_provisioning.rb
693
+ - lib/fastlane/actions/verify_xcode.rb
693
694
  - lib/fastlane/actions/version_bump_podspec.rb
694
695
  - lib/fastlane/actions/version_get_podspec.rb
695
696
  - lib/fastlane/actions/xcode_select.rb