fastlane 1.20.0 → 1.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/bin/fastlane +16 -16
  3. data/lib/assets/custom_action_template.rb +2 -2
  4. data/lib/fastlane.rb +1 -0
  5. data/lib/fastlane/action.rb +5 -6
  6. data/lib/fastlane/action_collector.rb +6 -6
  7. data/lib/fastlane/actions/actions_helper.rb +12 -74
  8. data/lib/fastlane/actions/add_git_tag.rb +2 -2
  9. data/lib/fastlane/actions/appstore.rb +2 -2
  10. data/lib/fastlane/actions/backup_file.rb +2 -2
  11. data/lib/fastlane/actions/backup_xcarchive.rb +11 -12
  12. data/lib/fastlane/actions/bundle_install.rb +5 -1
  13. data/lib/fastlane/actions/chatwork.rb +12 -12
  14. data/lib/fastlane/actions/clean_build_artifacts.rb +4 -6
  15. data/lib/fastlane/actions/clipboard.rb +1 -1
  16. data/lib/fastlane/actions/commit_version_bump.rb +35 -10
  17. data/lib/fastlane/actions/crashlytics.rb +26 -26
  18. data/lib/fastlane/actions/create_keychain.rb +6 -6
  19. data/lib/fastlane/actions/default_platform.rb +1 -1
  20. data/lib/fastlane/actions/delete_keychain.rb +3 -3
  21. data/lib/fastlane/actions/deliver.rb +3 -3
  22. data/lib/fastlane/actions/deploygate.rb +19 -18
  23. data/lib/fastlane/actions/dsym_zip.rb +7 -9
  24. data/lib/fastlane/actions/ensure_git_branch.rb +2 -3
  25. data/lib/fastlane/actions/ensure_no_debug_code.rb +8 -8
  26. data/lib/fastlane/actions/fastlane_version.rb +4 -2
  27. data/lib/fastlane/actions/frameit.rb +7 -7
  28. data/lib/fastlane/actions/gcovr.rb +5 -4
  29. data/lib/fastlane/actions/get_build_number.rb +27 -30
  30. data/lib/fastlane/actions/get_github_release.rb +11 -11
  31. data/lib/fastlane/actions/get_version_number.rb +28 -30
  32. data/lib/fastlane/actions/git_branch.rb +1 -2
  33. data/lib/fastlane/actions/gym.rb +2 -2
  34. data/lib/fastlane/actions/hg_commit_version_bump.rb +28 -6
  35. data/lib/fastlane/actions/hg_push.rb +0 -1
  36. data/lib/fastlane/actions/hipchat.rb +20 -20
  37. data/lib/fastlane/actions/hockey.rb +16 -17
  38. data/lib/fastlane/actions/import.rb +1 -2
  39. data/lib/fastlane/actions/import_certificate.rb +1 -1
  40. data/lib/fastlane/actions/import_from_git.rb +6 -2
  41. data/lib/fastlane/actions/increment_build_number.rb +25 -28
  42. data/lib/fastlane/actions/increment_version_number.rb +55 -57
  43. data/lib/fastlane/actions/install_carthage.rb +10 -11
  44. data/lib/fastlane/actions/install_cocoapods.rb +3 -3
  45. data/lib/fastlane/actions/ipa.rb +8 -6
  46. data/lib/fastlane/actions/is_ci.rb +37 -0
  47. data/lib/fastlane/actions/lane_context.rb +2 -2
  48. data/lib/fastlane/actions/last_git_tag.rb +1 -1
  49. data/lib/fastlane/actions/lcov.rb +28 -31
  50. data/lib/fastlane/actions/mailgun.rb +11 -42
  51. data/lib/fastlane/actions/oclint.rb +10 -13
  52. data/lib/fastlane/actions/pem.rb +2 -2
  53. data/lib/fastlane/actions/pilot.rb +4 -2
  54. data/lib/fastlane/actions/prompt.rb +6 -6
  55. data/lib/fastlane/actions/push_git_tags.rb +38 -0
  56. data/lib/fastlane/actions/push_to_git_remote.rb +4 -1
  57. data/lib/fastlane/actions/puts.rb +1 -1
  58. data/lib/fastlane/actions/register_devices.rb +4 -3
  59. data/lib/fastlane/actions/reset_git_repo.rb +6 -6
  60. data/lib/fastlane/actions/resign.rb +4 -5
  61. data/lib/fastlane/actions/restore_file.rb +2 -2
  62. data/lib/fastlane/actions/s3.rb +19 -22
  63. data/lib/fastlane/actions/set_build_number_repository.rb +26 -36
  64. data/lib/fastlane/actions/set_changelog.rb +4 -4
  65. data/lib/fastlane/actions/set_github_release.rb +10 -11
  66. data/lib/fastlane/actions/sigh.rb +1 -1
  67. data/lib/fastlane/actions/slack.rb +85 -74
  68. data/lib/fastlane/actions/snapshot.rb +2 -2
  69. data/lib/fastlane/actions/team_id.rb +2 -1
  70. data/lib/fastlane/actions/team_name.rb +2 -1
  71. data/lib/fastlane/actions/testflight.rb +2 -2
  72. data/lib/fastlane/actions/testmunk.rb +16 -16
  73. data/lib/fastlane/actions/typetalk.rb +14 -14
  74. data/lib/fastlane/actions/update_app_group_identifiers.rb +17 -17
  75. data/lib/fastlane/actions/update_fastlane.rb +16 -14
  76. data/lib/fastlane/actions/update_info_plist.rb +14 -16
  77. data/lib/fastlane/actions/update_project_code_signing.rb +3 -3
  78. data/lib/fastlane/actions/update_project_provisioning.rb +48 -36
  79. data/lib/fastlane/actions/xcode_select.rb +4 -3
  80. data/lib/fastlane/actions/xcode_server_get_assets.rb +23 -24
  81. data/lib/fastlane/actions/xcodebuild.rb +13 -13
  82. data/lib/fastlane/actions/xctool.rb +2 -2
  83. data/lib/fastlane/actions_list.rb +27 -29
  84. data/lib/fastlane/command_line_handler.rb +13 -14
  85. data/lib/fastlane/configuration_helper.rb +18 -20
  86. data/lib/fastlane/core_ext/string.rb +2 -2
  87. data/lib/fastlane/docs_generator.rb +33 -32
  88. data/lib/fastlane/erb_template_helper.rb +1 -1
  89. data/lib/fastlane/fast_file.rb +27 -18
  90. data/lib/fastlane/fastlane_folder.rb +1 -1
  91. data/lib/fastlane/helper/git_helper.rb +27 -0
  92. data/lib/fastlane/helper/sh_helper.rb +48 -0
  93. data/lib/fastlane/junit_generator.rb +1 -1
  94. data/lib/fastlane/lane.rb +6 -6
  95. data/lib/fastlane/lane_list.rb +12 -13
  96. data/lib/fastlane/lane_manager.rb +17 -11
  97. data/lib/fastlane/new_action.rb +1 -1
  98. data/lib/fastlane/runner.rb +23 -24
  99. data/lib/fastlane/setup.rb +16 -17
  100. data/lib/fastlane/supported_platforms.rb +2 -2
  101. data/lib/fastlane/version.rb +1 -1
  102. metadata +16 -12
@@ -3,7 +3,6 @@ module Fastlane
3
3
  # Pushes commits to the remote hg repo
4
4
  class HgPushAction < Action
5
5
  def self.run(params)
6
-
7
6
  command = ['hg', 'push']
8
7
 
9
8
  command << '--force' if params[:force]
@@ -16,7 +16,7 @@ module Fastlane
16
16
 
17
17
  channel = options[:channel]
18
18
  color = (options[:success] ? 'green' : 'red')
19
-
19
+
20
20
  the_message = options[:message]
21
21
  message = "<table><tr><td><img src='https://s3-eu-west-1.amazonaws.com/fastlane.tools/fastlane.png' width='50' height='50'></td><td>#{the_message[0..9999]}</td></tr></table>"
22
22
 
@@ -70,14 +70,14 @@ module Fastlane
70
70
 
71
71
  def self.check_response_code(response, channel)
72
72
  case response.code.to_i
73
- when 200, 204
74
- true
75
- when 404
76
- raise "Channel `#{channel}` not found".red
77
- when 401
78
- raise "Access denied for channel `#{channel}`".red
79
- else
80
- raise "Unexpected #{response.code} for `#{channel}` with response: #{response.body}".red
73
+ when 200, 204
74
+ true
75
+ when 404
76
+ raise "Channel `#{channel}` not found".red
77
+ when 401
78
+ raise "Access denied for channel `#{channel}`".red
79
+ else
80
+ raise "Unexpected #{response.code} for `#{channel}` with response: #{response.body}".red
81
81
  end
82
82
  end
83
83
 
@@ -97,11 +97,11 @@ module Fastlane
97
97
  FastlaneCore::ConfigItem.new(key: :api_token,
98
98
  env_name: "HIPCHAT_API_TOKEN",
99
99
  description: "Hipchat API Token",
100
- verify_block: Proc.new do |value|
101
- unless value.to_s.length > 0
102
- Helper.log.fatal "Please add 'ENV[\"HIPCHAT_API_TOKEN\"] = \"your token\"' to your Fastfile's `before_all` section.".red
103
- raise 'No HIPCHAT_API_TOKEN given.'.red
104
- end
100
+ verify_block: proc do |value|
101
+ unless value.to_s.length > 0
102
+ Helper.log.fatal "Please add 'ENV[\"HIPCHAT_API_TOKEN\"] = \"your token\"' to your Fastfile's `before_all` section.".red
103
+ raise 'No HIPCHAT_API_TOKEN given.'.red
104
+ end
105
105
  end),
106
106
  FastlaneCore::ConfigItem.new(key: :success,
107
107
  env_name: "FL_HIPCHAT_SUCCESS",
@@ -112,11 +112,11 @@ module Fastlane
112
112
  FastlaneCore::ConfigItem.new(key: :version,
113
113
  env_name: "HIPCHAT_API_VERSION",
114
114
  description: "Version of the Hipchat API. Must be 1 or 2",
115
- verify_block: Proc.new do |value|
116
- if value.nil? || ![1, 2].include?(value.to_i)
117
- Helper.log.fatal "Please add 'ENV[\"HIPCHAT_API_VERSION\"] = \"1 or 2\"' to your Fastfile's `before_all` section.".red
118
- raise 'No HIPCHAT_API_VERSION given.'.red
119
- end
115
+ verify_block: proc do |value|
116
+ if value.nil? || ![1, 2].include?(value.to_i)
117
+ Helper.log.fatal "Please add 'ENV[\"HIPCHAT_API_VERSION\"] = \"1 or 2\"' to your Fastfile's `before_all` section.".red
118
+ raise 'No HIPCHAT_API_VERSION given.'.red
119
+ end
120
120
  end),
121
121
  FastlaneCore::ConfigItem.new(key: :notify_room,
122
122
  env_name: "HIPCHAT_NOTIFY_ROOM",
@@ -129,7 +129,7 @@ module Fastlane
129
129
  description: "The host of the HipChat-Server API",
130
130
  default_value: "api.hipchat.com",
131
131
  optional: true)
132
- ]
132
+ ]
133
133
  end
134
134
 
135
135
  def self.author
@@ -28,7 +28,7 @@ module Fastlane
28
28
  end
29
29
  end
30
30
 
31
- raise "Symbols on path '#{File.expand_path(dsym_filename)}' not found".red if (dsym_filename && !File.exist?(dsym_filename))
31
+ raise "Symbols on path '#{File.expand_path(dsym_filename)}' not found".red if dsym_filename && !File.exist?(dsym_filename)
32
32
 
33
33
  Helper.log.info 'Starting with ipa upload to HockeyApp... this could take some time.'.green
34
34
 
@@ -42,16 +42,16 @@ module Fastlane
42
42
 
43
43
  response = client.upload_build(options[:ipa], values)
44
44
  case response.status
45
- when 200...300
46
- url = response.body['public_url']
45
+ when 200...300
46
+ url = response.body['public_url']
47
47
 
48
- Actions.lane_context[SharedValues::HOCKEY_DOWNLOAD_LINK] = url
49
- Actions.lane_context[SharedValues::HOCKEY_BUILD_INFORMATION] = response.body
48
+ Actions.lane_context[SharedValues::HOCKEY_DOWNLOAD_LINK] = url
49
+ Actions.lane_context[SharedValues::HOCKEY_BUILD_INFORMATION] = response.body
50
50
 
51
- Helper.log.info "Public Download URL: #{url}" if url
52
- Helper.log.info 'Build successfully uploaded to HockeyApp!'.green
53
- else
54
- raise "Error when trying to upload ipa to HockeyApp: #{response.body}".red
51
+ Helper.log.info "Public Download URL: #{url}" if url
52
+ Helper.log.info 'Build successfully uploaded to HockeyApp!'.green
53
+ else
54
+ raise "Error when trying to upload ipa to HockeyApp: #{response.body}".red
55
55
  end
56
56
  end
57
57
 
@@ -64,23 +64,23 @@ module Fastlane
64
64
  FastlaneCore::ConfigItem.new(key: :api_token,
65
65
  env_name: "FL_HOCKEY_API_TOKEN",
66
66
  description: "API Token for Hockey Access",
67
- verify_block: Proc.new do |value|
68
- raise "No API token for Hockey given, pass using `api_token: 'token'`".red unless (value and not value.empty?)
67
+ verify_block: proc do |value|
68
+ raise "No API token for Hockey given, pass using `api_token: 'token'`".red unless value and !value.empty?
69
69
  end),
70
70
  FastlaneCore::ConfigItem.new(key: :ipa,
71
71
  env_name: "FL_HOCKEY_IPA",
72
72
  description: "Path to your IPA file. Optional if you use the `ipa` or `xcodebuild` action. For Mac zip the .app",
73
73
  default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
74
- verify_block: Proc.new do |value|
75
- raise "Couldn't find ipa file at path '#{value}'".red unless File.exists?(value)
74
+ verify_block: proc do |value|
75
+ raise "Couldn't find ipa file at path '#{value}'".red unless File.exist?(value)
76
76
  end),
77
77
  FastlaneCore::ConfigItem.new(key: :dsym,
78
78
  env_name: "FL_HOCKEY_DSYM",
79
79
  description: "Path to your DSYM file",
80
80
  default_value: Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH],
81
81
  optional: true,
82
- verify_block: Proc.new do |value|
83
- # validation is done in the action
82
+ verify_block: proc do |value|
83
+ # validation is done in the action
84
84
  end),
85
85
  FastlaneCore::ConfigItem.new(key: :notes,
86
86
  env_name: "FL_HOCKEY_NOTES",
@@ -149,9 +149,8 @@ module Fastlane
149
149
  end
150
150
 
151
151
  def self.is_supported?(platform)
152
- [:ios, :mac].include?platform
152
+ [:ios, :mac].include? platform
153
153
  end
154
154
  end
155
155
  end
156
156
  end
157
-
@@ -21,7 +21,6 @@ module Fastlane
21
21
  end
22
22
 
23
23
  def self.available_options
24
-
25
24
  end
26
25
 
27
26
  def self.output
@@ -37,4 +36,4 @@ module Fastlane
37
36
  end
38
37
  end
39
38
  end
40
- end
39
+ end
@@ -29,7 +29,7 @@ module Fastlane
29
29
  FastlaneCore::ConfigItem.new(key: :certificate_password,
30
30
  env_name: "",
31
31
  description: "Certificate password",
32
- optional: true),
32
+ optional: true)
33
33
  ]
34
34
  end
35
35
 
@@ -25,11 +25,15 @@ module Fastlane
25
25
  FastlaneCore::ConfigItem.new(key: :url,
26
26
  description: "The url of the repository to import the Fastfile from",
27
27
  default_value: nil),
28
+ FastlaneCore::ConfigItem.new(key: :branch,
29
+ description: "The branch to check-out on the repository",
30
+ default_value: 'HEAD',
31
+ optional: true),
28
32
  FastlaneCore::ConfigItem.new(key: :path,
29
33
  description: "The path of the Fastfile in the repository",
30
34
  default_value: 'fastlane/Fastfile',
31
35
  optional: true)
32
- ]
36
+ ]
33
37
  end
34
38
 
35
39
  def self.authors
@@ -41,4 +45,4 @@ module Fastlane
41
45
  end
42
46
  end
43
47
  end
44
- end
48
+ end
@@ -8,7 +8,7 @@ module Fastlane
8
8
  require 'shellwords'
9
9
 
10
10
  def self.is_supported?(platform)
11
- [:ios, :mac].include?platform
11
+ [:ios, :mac].include? platform
12
12
  end
13
13
 
14
14
  def self.run(params)
@@ -16,36 +16,33 @@ module Fastlane
16
16
  # https://developer.apple.com/library/ios/qa/qa1827/_index.html
17
17
  # Attention: This is NOT the version number - but the build number
18
18
 
19
- begin
20
- folder = params[:xcodeproj] ? File.join('.', params[:xcodeproj], '..') : '.'
21
-
22
- command_prefix = [
23
- 'cd',
24
- File.expand_path(folder).shellescape,
25
- '&&'
26
- ].join(' ')
19
+ folder = params[:xcodeproj] ? File.join('.', params[:xcodeproj], '..') : '.'
27
20
 
28
- command = [
29
- command_prefix,
30
- 'agvtool',
31
- params[:build_number] ? "new-version -all #{params[:build_number]}" : 'next-version -all'
32
- ].join(' ')
21
+ command_prefix = [
22
+ 'cd',
23
+ File.expand_path(folder).shellescape,
24
+ '&&'
25
+ ].join(' ')
33
26
 
34
- if Helper.test?
35
- Actions.lane_context[SharedValues::BUILD_NUMBER] = command
36
- else
27
+ command = [
28
+ command_prefix,
29
+ 'agvtool',
30
+ params[:build_number] ? "new-version -all #{params[:build_number]}" : 'next-version -all'
31
+ ].join(' ')
37
32
 
38
- Actions.sh command
33
+ if Helper.test?
34
+ Actions.lane_context[SharedValues::BUILD_NUMBER] = command
35
+ else
36
+ Actions.sh command
39
37
 
40
- # Store the new number in the shared hash
41
- build_number = `#{command_prefix} agvtool what-version`.split("\n").last.to_i
38
+ # Store the new number in the shared hash
39
+ build_number = `#{command_prefix} agvtool what-version`.split("\n").last.strip
42
40
 
43
- Actions.lane_context[SharedValues::BUILD_NUMBER] = build_number
44
- end
45
- rescue => ex
46
- Helper.log.error 'Make sure to to follow the steps to setup your Xcode project: https://developer.apple.com/library/ios/qa/qa1827/_index.html'.yellow
47
- raise ex
41
+ Actions.lane_context[SharedValues::BUILD_NUMBER] = build_number
48
42
  end
43
+ rescue => ex
44
+ Helper.log.error 'Make sure to to follow the steps to setup your Xcode project: https://developer.apple.com/library/ios/qa/qa1827/_index.html'.yellow
45
+ raise ex
49
46
  end
50
47
 
51
48
  def self.description
@@ -63,9 +60,9 @@ module Fastlane
63
60
  env_name: "FL_BUILD_NUMBER_PROJECT",
64
61
  description: "optional, you must specify the path to your main Xcode project if it is not in the project root directory",
65
62
  optional: true,
66
- verify_block: Proc.new do |value|
67
- raise "Please pass the path to the project, not the workspace".red if value.include?"workspace"
68
- raise "Could not find Xcode project".red if (not File.exists?(value) and not Helper.is_test?)
63
+ verify_block: proc do |value|
64
+ raise "Please pass the path to the project, not the workspace".red if value.include? "workspace"
65
+ raise "Could not find Xcode project".red if !File.exist?(value) and !Helper.is_test?
69
66
  end)
70
67
  ]
71
68
  end
@@ -8,71 +8,69 @@ module Fastlane
8
8
  require 'shellwords'
9
9
 
10
10
  def self.is_supported?(platform)
11
- [:ios, :mac].include?platform
11
+ [:ios, :mac].include? platform
12
12
  end
13
13
 
14
14
  def self.run(params)
15
15
  # More information about how to set up your project and how it works:
16
16
  # https://developer.apple.com/library/ios/qa/qa1827/_index.html
17
17
 
18
- begin
19
- folder = params[:xcodeproj] ? File.join('.', params[:xcodeproj], '..') : '.'
18
+ folder = params[:xcodeproj] ? File.join('.', params[:xcodeproj], '..') : '.'
20
19
 
21
- command_prefix = [
22
- 'cd',
23
- File.expand_path(folder).shellescape,
24
- '&&'
25
- ].join(' ')
20
+ command_prefix = [
21
+ 'cd',
22
+ File.expand_path(folder).shellescape,
23
+ '&&'
24
+ ].join(' ')
26
25
 
27
- current_version = `#{command_prefix} agvtool what-marketing-version -terse1`.split("\n").last || ''
26
+ current_version = `#{command_prefix} agvtool what-marketing-version -terse1`.split("\n").last || ''
28
27
 
29
- if params[:version_number]
30
- Helper.log.debug "Your current version (#{current_version}) does not respect the format A.B.C" unless current_version.match(/\d.\d.\d/)
28
+ if params[:version_number]
29
+ Helper.log.debug "Your current version (#{current_version}) does not respect the format A.B.C" unless current_version.match(/\d.\d.\d/)
31
30
 
32
- # Specific version
33
- next_version_number = params[:version_number]
31
+ # Specific version
32
+ next_version_number = params[:version_number]
33
+ else
34
+ if Helper.test?
35
+ version_array = [1, 0, 0]
34
36
  else
35
- if Helper.test?
36
- version_array = [1,0,0]
37
- else
38
- raise "Your current version (#{current_version}) does not respect the format A.B.C" unless current_version.match(/\d+.\d+.\d+/)
39
- version_array = current_version.split(".").map(&:to_i)
40
- end
41
-
42
- case params[:bump_type]
43
- when "patch"
44
- version_array[2] = version_array[2] + 1
45
- next_version_number = version_array.join(".")
46
- when "minor"
47
- version_array[1] = version_array[1] + 1
48
- version_array[2] = version_array[2] = 0
49
- next_version_number = version_array.join(".")
50
- when "major"
51
- version_array[0] = version_array[0] + 1
52
- version_array[1] = version_array[1] = 0
53
- version_array[1] = version_array[2] = 0
54
- next_version_number = version_array.join(".")
55
- when "specific_version"
56
- next_version_number = specific_version_number
57
- end
37
+ raise "Your current version (#{current_version}) does not respect the format A.B.C" unless current_version.match(/\d+.\d+.\d+/)
38
+ version_array = current_version.split(".").map(&:to_i)
58
39
  end
59
40
 
60
- command = [
61
- command_prefix,
62
- "agvtool new-marketing-version #{next_version_number}"
63
- ].join(' ')
64
-
65
- if Helper.test?
66
- Actions.lane_context[SharedValues::VERSION_NUMBER] = command
67
- else
68
- Actions.sh command
69
- Actions.lane_context[SharedValues::VERSION_NUMBER] = next_version_number
41
+ case params[:bump_type]
42
+ when "patch"
43
+ version_array[2] = version_array[2] + 1
44
+ next_version_number = version_array.join(".")
45
+ when "minor"
46
+ version_array[1] = version_array[1] + 1
47
+ version_array[2] = version_array[2] = 0
48
+ next_version_number = version_array.join(".")
49
+ when "major"
50
+ version_array[0] = version_array[0] + 1
51
+ version_array[1] = version_array[1] = 0
52
+ version_array[1] = version_array[2] = 0
53
+ next_version_number = version_array.join(".")
54
+ when "specific_version"
55
+ next_version_number = specific_version_number
70
56
  end
57
+ end
58
+
59
+ command = [
60
+ command_prefix,
61
+ "agvtool new-marketing-version #{next_version_number}"
62
+ ].join(' ')
71
63
 
72
- rescue => ex
73
- Helper.log.error 'Make sure to to follow the steps to setup your Xcode project: https://developer.apple.com/library/ios/qa/qa1827/_index.html'.yellow
74
- raise ex
64
+ if Helper.test?
65
+ Actions.lane_context[SharedValues::VERSION_NUMBER] = command
66
+ else
67
+ Actions.sh command
68
+ Actions.lane_context[SharedValues::VERSION_NUMBER] = next_version_number
75
69
  end
70
+
71
+ rescue => ex
72
+ Helper.log.error 'Make sure to to follow the steps to setup your Xcode project: https://developer.apple.com/library/ios/qa/qa1827/_index.html'.yellow
73
+ raise ex
76
74
  end
77
75
 
78
76
  def self.description
@@ -81,7 +79,7 @@ module Fastlane
81
79
 
82
80
  def self.details
83
81
  [
84
- "This action will increment the version number. ",
82
+ "This action will increment the version number. ",
85
83
  "You first have to set up your Xcode project, if you haven't done it already:",
86
84
  "https://developer.apple.com/library/ios/qa/qa1827/_index.html"
87
85
  ].join(' ')
@@ -93,20 +91,20 @@ module Fastlane
93
91
  env_name: "FL_VERSION_NUMBER_BUMP_TYPE",
94
92
  description: "The type of this version bump. Available: patch, minor, major",
95
93
  default_value: "patch",
96
- verify_block: Proc.new do |value|
97
- raise "Available values are 'patch', 'minor' and 'major'" unless ['patch', 'minor', 'major'].include?value
94
+ verify_block: proc do |value|
95
+ raise "Available values are 'patch', 'minor' and 'major'" unless ['patch', 'minor', 'major'].include? value
98
96
  end),
99
97
  FastlaneCore::ConfigItem.new(key: :version_number,
100
98
  env_name: "FL_VERSION_NUMBER_VERSION_NUMBER",
101
99
  description: "Change to a specific version. This will replace the bump type value",
102
- optional: true,
103
- ),
100
+ optional: true
101
+ ),
104
102
  FastlaneCore::ConfigItem.new(key: :xcodeproj,
105
103
  env_name: "FL_VERSION_NUMBER_PROJECT",
106
104
  description: "optional, you must specify the path to your main Xcode project if it is not in the project root directory",
107
- verify_block: Proc.new do |value|
108
- raise "Please pass the path to the project, not the workspace".red if value.include?"workspace"
109
- raise "Could not find Xcode project".red unless File.exists?(value)
105
+ verify_block: proc do |value|
106
+ raise "Please pass the path to the project, not the workspace".red if value.include? "workspace"
107
+ raise "Could not find Xcode project".red unless File.exist?(value)
110
108
  end,
111
109
  optional: true)
112
110
  ]
@@ -2,7 +2,6 @@ module Fastlane
2
2
  module Actions
3
3
  class CarthageAction < Action
4
4
  def self.run(params)
5
-
6
5
  cmd = ["carthage bootstrap"]
7
6
 
8
7
  cmd << "--use-ssh" if params[:use_ssh]
@@ -24,37 +23,37 @@ module Fastlane
24
23
  description: "Use SSH for downloading GitHub repositories",
25
24
  is_string: false,
26
25
  optional: true,
27
- verify_block: Proc.new do |value|
28
- raise "Please pass a valid value for use_ssh. Use one of the following: true, false" unless value.is_a?(TrueClass) || value.is_a?(FalseClass)
26
+ verify_block: proc do |value|
27
+ raise "Please pass a valid value for use_ssh. Use one of the following: true, false" unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
29
28
  end),
30
29
  FastlaneCore::ConfigItem.new(key: :use_submodules,
31
30
  env_name: "FL_CARTHAGE_USE_SUBMODULES",
32
31
  description: "Add dependencies as Git submodules",
33
32
  is_string: false,
34
33
  optional: true,
35
- verify_block: Proc.new do |value|
36
- raise "Please pass a valid value for use_submodules. Use one of the following: true, false" unless value.is_a?(TrueClass) || value.is_a?(FalseClass)
34
+ verify_block: proc do |value|
35
+ raise "Please pass a valid value for use_submodules. Use one of the following: true, false" unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
37
36
  end),
38
37
  FastlaneCore::ConfigItem.new(key: :use_binaries,
39
38
  env_name: "FL_CARTHAGE_USE_BINARIES",
40
39
  description: "Check out dependency repositories even when prebuilt frameworks exist",
41
40
  is_string: false,
42
41
  optional: true,
43
- verify_block: Proc.new do |value|
44
- raise "Please pass a valid value for use_binaries. Use one of the following: true, false" unless value.is_a?(TrueClass) || value.is_a?(FalseClass)
42
+ verify_block: proc do |value|
43
+ raise "Please pass a valid value for use_binaries. Use one of the following: true, false" unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
45
44
  end),
46
45
  FastlaneCore::ConfigItem.new(key: :platform,
47
46
  env_name: "FL_CARTHAGE_PLATFORM",
48
47
  description: "Define which platform to build for",
49
48
  optional: true,
50
- verify_block: Proc.new do |value|
51
- raise "Please pass a valid platform. Use one of the following: all, iOS, Mac, watchOS" unless ["all", "iOS", "Mac", "watchOS"].include?value
52
- end),
49
+ verify_block: proc do |value|
50
+ raise "Please pass a valid platform. Use one of the following: all, iOS, Mac, watchOS" unless ["all", "iOS", "Mac", "watchOS"].include? value
51
+ end)
53
52
  ]
54
53
  end
55
54
 
56
55
  def self.is_supported?(platform)
57
- [:ios, :mac].include?platform
56
+ [:ios, :mac].include? platform
58
57
  end
59
58
 
60
59
  def self.authors