fastlane 1.68.0 → 1.69.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/assets/DefaultFastfileTemplate +3 -6
- data/lib/assets/FastfileTemplateAndroid +3 -5
- data/lib/assets/custom_action_template.rb +2 -2
- data/lib/fastlane/action.rb +1 -1
- data/lib/fastlane/actions/actions_helper.rb +2 -2
- data/lib/fastlane/actions/appaloosa.rb +1 -1
- data/lib/fastlane/actions/appetize.rb +70 -51
- data/lib/fastlane/actions/appium.rb +3 -3
- data/lib/fastlane/actions/appledoc.rb +1 -1
- data/lib/fastlane/actions/backup_xcarchive.rb +2 -2
- data/lib/fastlane/actions/badge.rb +8 -8
- data/lib/fastlane/actions/carthage.rb +22 -9
- data/lib/fastlane/actions/changelog_from_git_commits.rb +4 -4
- data/lib/fastlane/actions/chatwork.rb +2 -2
- data/lib/fastlane/actions/clean_cocoapods_cache.rb +1 -1
- data/lib/fastlane/actions/cocoapods.rb +1 -1
- data/lib/fastlane/actions/commit_version_bump.rb +6 -6
- data/lib/fastlane/actions/crashlytics.rb +7 -7
- data/lib/fastlane/actions/default_platform.rb +1 -1
- data/lib/fastlane/actions/deploygate.rb +19 -6
- data/lib/fastlane/actions/dotgpg_environment.rb +1 -1
- data/lib/fastlane/actions/download.rb +1 -1
- data/lib/fastlane/actions/download_dsyms.rb +31 -2
- data/lib/fastlane/actions/dsym_zip.rb +1 -1
- data/lib/fastlane/actions/ensure_git_branch.rb +1 -1
- data/lib/fastlane/actions/ensure_no_debug_code.rb +2 -2
- data/lib/fastlane/actions/ensure_xcode_version.rb +1 -1
- data/lib/fastlane/actions/fastlane_version.rb +2 -2
- data/lib/fastlane/actions/frameit.rb +1 -1
- data/lib/fastlane/actions/gcovr.rb +1 -1
- data/lib/fastlane/actions/get_build_number.rb +2 -2
- data/lib/fastlane/actions/get_build_number_repository.rb +1 -1
- data/lib/fastlane/actions/get_github_release.rb +3 -3
- data/lib/fastlane/actions/get_info_plist_value.rb +1 -1
- data/lib/fastlane/actions/get_version_number.rb +2 -2
- data/lib/fastlane/actions/git_add.rb +2 -2
- data/lib/fastlane/actions/git_commit.rb +2 -2
- data/lib/fastlane/actions/git_pull.rb +1 -1
- data/lib/fastlane/actions/gradle.rb +1 -1
- data/lib/fastlane/actions/hg_commit_version_bump.rb +7 -7
- data/lib/fastlane/actions/hipchat.rb +7 -7
- data/lib/fastlane/actions/hockey.rb +8 -8
- data/lib/fastlane/actions/increment_build_number.rb +2 -2
- data/lib/fastlane/actions/increment_version_number.rb +4 -4
- data/lib/fastlane/actions/install_on_device.rb +3 -3
- data/lib/fastlane/actions/install_xcode_plugin.rb +2 -2
- data/lib/fastlane/actions/installr.rb +3 -3
- data/lib/fastlane/actions/ipa.rb +1 -1
- data/lib/fastlane/actions/latest_testflight_build_number.rb +1 -1
- data/lib/fastlane/actions/lcov.rb +1 -1
- data/lib/fastlane/actions/nexus_upload.rb +1 -1
- data/lib/fastlane/actions/number_of_commits.rb +1 -1
- data/lib/fastlane/actions/oclint.rb +2 -2
- data/lib/fastlane/actions/onesignal.rb +3 -3
- data/lib/fastlane/actions/pod_push.rb +3 -3
- data/lib/fastlane/actions/podio_item.rb +11 -11
- data/lib/fastlane/actions/read_podspec.rb +1 -1
- data/lib/fastlane/actions/register_devices.rb +6 -6
- data/lib/fastlane/actions/reset_git_repo.rb +1 -1
- data/lib/fastlane/actions/resign.rb +3 -3
- data/lib/fastlane/actions/restore_file.rb +1 -1
- data/lib/fastlane/actions/s3.rb +4 -4
- data/lib/fastlane/actions/say.rb +1 -1
- data/lib/fastlane/actions/set_github_release.rb +10 -10
- data/lib/fastlane/actions/set_info_plist_value.rb +1 -1
- data/lib/fastlane/actions/slack.rb +2 -2
- data/lib/fastlane/actions/slather.rb +1 -1
- data/lib/fastlane/actions/sonar.rb +2 -2
- data/lib/fastlane/actions/splunkmint.rb +3 -3
- data/lib/fastlane/actions/ssh.rb +1 -1
- data/lib/fastlane/actions/supply.rb +6 -1
- data/lib/fastlane/actions/swiftlint.rb +3 -3
- data/lib/fastlane/actions/team_id.rb +1 -1
- data/lib/fastlane/actions/team_name.rb +1 -1
- data/lib/fastlane/actions/testfairy.rb +3 -3
- data/lib/fastlane/actions/testmunk.rb +5 -5
- data/lib/fastlane/actions/tryouts.rb +6 -6
- data/lib/fastlane/actions/typetalk.rb +2 -2
- data/lib/fastlane/actions/unlock_keychain.rb +1 -1
- data/lib/fastlane/actions/update_app_group_identifiers.rb +6 -6
- data/lib/fastlane/actions/update_app_identifier.rb +6 -6
- data/lib/fastlane/actions/update_info_plist.rb +4 -4
- data/lib/fastlane/actions/update_project_code_signing.rb +2 -2
- data/lib/fastlane/actions/update_project_provisioning.rb +4 -4
- data/lib/fastlane/actions/update_project_team.rb +2 -2
- data/lib/fastlane/actions/update_url_schemes.rb +1 -1
- data/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +1 -0
- data/lib/fastlane/actions/upload_symbols_to_sentry.rb +3 -3
- data/lib/fastlane/actions/verify_build.rb +13 -13
- data/lib/fastlane/actions/verify_xcode.rb +2 -2
- data/lib/fastlane/actions/version_bump_podspec.rb +3 -3
- data/lib/fastlane/actions/version_get_podspec.rb +2 -2
- data/lib/fastlane/actions/xcode_install.rb +1 -1
- data/lib/fastlane/actions/xcode_select.rb +2 -2
- data/lib/fastlane/actions/xcode_server_get_assets.rb +10 -10
- data/lib/fastlane/actions/xcodebuild.rb +2 -2
- data/lib/fastlane/actions/xctool.rb +1 -1
- data/lib/fastlane/actions/zip.rb +58 -0
- data/lib/fastlane/command_line_handler.rb +1 -1
- data/lib/fastlane/documentation/actions_list.rb +1 -1
- data/lib/fastlane/erb_template_helper.rb +1 -1
- data/lib/fastlane/helper/crashlytics_helper.rb +5 -5
- data/lib/fastlane/helper/git_helper.rb +2 -1
- data/lib/fastlane/helper/gradle_helper.rb +0 -2
- data/lib/fastlane/helper/podspec_helper.rb +2 -2
- data/lib/fastlane/lane_manager.rb +3 -3
- data/lib/fastlane/one_off.rb +3 -3
- data/lib/fastlane/runner.rb +7 -7
- data/lib/fastlane/setup/setup.rb +1 -2
- data/lib/fastlane/supported_platforms.rb +1 -1
- data/lib/fastlane/version.rb +1 -1
- metadata +20 -5
@@ -32,10 +32,10 @@ module Fastlane
|
|
32
32
|
is_string: false,
|
33
33
|
verify_block: proc do |value|
|
34
34
|
if value.kind_of?(String)
|
35
|
-
|
35
|
+
UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
|
36
36
|
else
|
37
37
|
value.each do |x|
|
38
|
-
|
38
|
+
UI.user_error!("Couldn't find file at path '#{x}'") unless File.exist?(x)
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end),
|
@@ -25,7 +25,7 @@ module Fastlane
|
|
25
25
|
optional: true,
|
26
26
|
default_value: false,
|
27
27
|
verify_block: proc do |value|
|
28
|
-
|
28
|
+
UI.user_error!("Please pass a valid value for only_tags. Use one of the following: true, false") unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
|
29
29
|
end)
|
30
30
|
]
|
31
31
|
end
|
@@ -30,7 +30,7 @@ module Fastlane
|
|
30
30
|
end
|
31
31
|
|
32
32
|
# Ensure we ended up with a valid path to gradle
|
33
|
-
|
33
|
+
UI.user_error!("Couldn't find gradlew at path '#{File.expand_path(gradle_path)}'") unless File.exist?(gradle_path)
|
34
34
|
|
35
35
|
# Construct our flags
|
36
36
|
flags = []
|
@@ -22,19 +22,19 @@ module Fastlane
|
|
22
22
|
if xcodeproj_path
|
23
23
|
# ensure that the xcodeproj passed in was OK
|
24
24
|
unless Helper.is_test?
|
25
|
-
|
25
|
+
UI.user_error!("Could not find the specified xcodeproj: #{xcodeproj_path}") unless File.directory?(xcodeproj_path)
|
26
26
|
end
|
27
27
|
else
|
28
28
|
# find an xcodeproj (ignoring the Cocoapods one)
|
29
29
|
xcodeproj_paths = Dir[File.expand_path(File.join(repo_path, '**/*.xcodeproj'))].reject { |path| %r{Pods\/.*.xcodeproj} =~ path }
|
30
30
|
|
31
31
|
# no projects found: error
|
32
|
-
|
32
|
+
UI.user_error!('Could not find a .xcodeproj in the current repository\'s working directory.') if xcodeproj_paths.count == 0
|
33
33
|
|
34
34
|
# too many projects found: error
|
35
35
|
if xcodeproj_paths.count > 1
|
36
36
|
relative_projects = xcodeproj_paths.map { |e| Pathname.new(e).relative_path_from(repo_pathname).to_s }.join("\n")
|
37
|
-
|
37
|
+
UI.user_error!("Found multiple .xcodeproj projects in the current repository's working directory. Please specify your app's main project: \n#{relative_projects}")
|
38
38
|
end
|
39
39
|
|
40
40
|
# one project found: great
|
@@ -76,7 +76,7 @@ module Fastlane
|
|
76
76
|
end
|
77
77
|
|
78
78
|
# little user hint
|
79
|
-
|
79
|
+
UI.user_error!("No file changes picked up. Make sure you run the `increment_build_number` action first.") if hg_dirty_files.empty?
|
80
80
|
|
81
81
|
# check if the files changed are the ones we expected to change (these should be only the files that have version info in them)
|
82
82
|
dirty_set = Set.new(hg_dirty_files.map(&:downcase))
|
@@ -91,7 +91,7 @@ module Fastlane
|
|
91
91
|
"stage in your lane, and don't touch the working directory while your lane is running. You can also use the :force option to ",
|
92
92
|
"bypass this check, and always commit a version bump regardless of the state of the working directory."
|
93
93
|
].join("\n")
|
94
|
-
|
94
|
+
UI.user_error!(str)
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
@@ -123,8 +123,8 @@ module Fastlane
|
|
123
123
|
description: "The path to your project file (Not the workspace). If you have only one, this is optional",
|
124
124
|
optional: true,
|
125
125
|
verify_block: proc do |value|
|
126
|
-
|
127
|
-
|
126
|
+
UI.user_error!("Please pass the path to the project, not the workspace") if value.end_with? ".xcworkspace"
|
127
|
+
UI.user_error!("Could not find Xcode project") unless File.exist?(value)
|
128
128
|
end),
|
129
129
|
FastlaneCore::ConfigItem.new(key: :force,
|
130
130
|
env_name: "FL_FORCE_COMMIT",
|
@@ -31,7 +31,7 @@ module Fastlane
|
|
31
31
|
if api_version.to_i == 1
|
32
32
|
########## running on V1 ##########
|
33
33
|
if user?(channel)
|
34
|
-
|
34
|
+
UI.user_error!("HipChat private message not working with API V1 please use API V2 instead")
|
35
35
|
else
|
36
36
|
uri = URI.parse("https://#{api_host}/v1/rooms/message")
|
37
37
|
response = Net::HTTP.post_form(uri, { 'from' => from,
|
@@ -78,11 +78,11 @@ module Fastlane
|
|
78
78
|
when 200, 204
|
79
79
|
true
|
80
80
|
when 404
|
81
|
-
|
81
|
+
UI.user_error!("Channel `#{channel}` not found")
|
82
82
|
when 401
|
83
|
-
|
83
|
+
UI.user_error!("Access denied for channel `#{channel}`")
|
84
84
|
else
|
85
|
-
|
85
|
+
UI.user_error!("Unexpected #{response.code} for `#{channel}` with response: #{response.body}")
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
@@ -105,7 +105,7 @@ module Fastlane
|
|
105
105
|
verify_block: proc do |value|
|
106
106
|
unless value.to_s.length > 0
|
107
107
|
UI.error("Please add 'ENV[\"HIPCHAT_API_TOKEN\"] = \"your token\"' to your Fastfile's `before_all` section.")
|
108
|
-
|
108
|
+
UI.user_error!("No HIPCHAT_API_TOKEN given.")
|
109
109
|
end
|
110
110
|
end),
|
111
111
|
FastlaneCore::ConfigItem.new(key: :custom_color,
|
@@ -125,7 +125,7 @@ module Fastlane
|
|
125
125
|
verify_block: proc do |value|
|
126
126
|
if value.nil? || ![1, 2].include?(value.to_i)
|
127
127
|
UI.error("Please add 'ENV[\"HIPCHAT_API_VERSION\"] = \"1 or 2\"' to your Fastfile's `before_all` section.")
|
128
|
-
|
128
|
+
UI.user_error!("No HIPCHAT_API_VERSION given.")
|
129
129
|
end
|
130
130
|
end),
|
131
131
|
FastlaneCore::ConfigItem.new(key: :notify_room,
|
@@ -147,7 +147,7 @@ module Fastlane
|
|
147
147
|
verify_block: proc do |value|
|
148
148
|
unless ["html", "text"].include?(value.to_s)
|
149
149
|
UI.error("Please specify the message format as either 'html' or 'text'.")
|
150
|
-
|
150
|
+
UI.user_error!("Unrecognized message_format.")
|
151
151
|
end
|
152
152
|
end),
|
153
153
|
FastlaneCore::ConfigItem.new(key: :include_html_header,
|
@@ -40,7 +40,7 @@ module Fastlane
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
|
43
|
+
UI.user_error!("Symbols on path '#{File.expand_path(dsym_filename)}' not found") if dsym_filename && !File.exist?(dsym_filename)
|
44
44
|
|
45
45
|
UI.success('Starting with ipa upload to HockeyApp... this could take some time.')
|
46
46
|
|
@@ -67,9 +67,9 @@ module Fastlane
|
|
67
67
|
UI.success('Build successfully uploaded to HockeyApp!')
|
68
68
|
else
|
69
69
|
if response.body.to_s.include?("App could not be created")
|
70
|
-
|
70
|
+
UI.user_error!("Hockey has an issue processing this app. Please confirm that an app in Hockey matches this IPA's bundle ID or that you are using the correct API upload token. If error persists, please provide the :public_identifier option from the HockeyApp website. More information https://github.com/fastlane/fastlane/issues/400")
|
71
71
|
else
|
72
|
-
|
72
|
+
UI.user_error!("Error when trying to upload ipa to HockeyApp: #{response.body}")
|
73
73
|
end
|
74
74
|
end
|
75
75
|
end
|
@@ -86,17 +86,17 @@ module Fastlane
|
|
86
86
|
default_value: Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH],
|
87
87
|
optional: true,
|
88
88
|
verify_block: proc do |value|
|
89
|
-
|
89
|
+
UI.user_error!("Couldn't find apk file at path '#{value}'") unless File.exist?(value)
|
90
90
|
end,
|
91
91
|
conflicting_options: [:ipa],
|
92
92
|
conflict_block: proc do |value|
|
93
|
-
|
93
|
+
UI.user_error!("You can't use 'apk' and '#{value.key}' options in one run")
|
94
94
|
end),
|
95
95
|
FastlaneCore::ConfigItem.new(key: :api_token,
|
96
96
|
env_name: "FL_HOCKEY_API_TOKEN",
|
97
97
|
description: "API Token for Hockey Access",
|
98
98
|
verify_block: proc do |value|
|
99
|
-
|
99
|
+
UI.user_error!("No API token for Hockey given, pass using `api_token: 'token'`") unless value and !value.empty?
|
100
100
|
end),
|
101
101
|
FastlaneCore::ConfigItem.new(key: :ipa,
|
102
102
|
env_name: "FL_HOCKEY_IPA",
|
@@ -104,11 +104,11 @@ module Fastlane
|
|
104
104
|
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
|
105
105
|
optional: true,
|
106
106
|
verify_block: proc do |value|
|
107
|
-
|
107
|
+
UI.user_error!("Couldn't find ipa file at path '#{value}'") unless File.exist?(value)
|
108
108
|
end,
|
109
109
|
conflicting_options: [:apk],
|
110
110
|
conflict_block: proc do |value|
|
111
|
-
|
111
|
+
UI.user_error!("You can't use 'ipa' and '#{value.key}' options in one run")
|
112
112
|
end),
|
113
113
|
FastlaneCore::ConfigItem.new(key: :dsym,
|
114
114
|
env_name: "FL_HOCKEY_DSYM",
|
@@ -61,8 +61,8 @@ module Fastlane
|
|
61
61
|
description: "optional, you must specify the path to your main Xcode project if it is not in the project root directory",
|
62
62
|
optional: true,
|
63
63
|
verify_block: proc do |value|
|
64
|
-
|
65
|
-
|
64
|
+
UI.user_error!("Please pass the path to the project, not the workspace") if value.end_with? ".xcworkspace"
|
65
|
+
UI.user_error!("Could not find Xcode project") if !File.exist?(value) and !Helper.is_test?
|
66
66
|
end)
|
67
67
|
]
|
68
68
|
end
|
@@ -34,7 +34,7 @@ module Fastlane
|
|
34
34
|
if Helper.test?
|
35
35
|
version_array = [1, 0, 0]
|
36
36
|
else
|
37
|
-
|
37
|
+
UI.user_error!("Your current version (#{current_version}) does not respect the format A.B.C") unless current_version =~ /\d+.\d+.\d+/
|
38
38
|
version_array = current_version.split(".").map(&:to_i)
|
39
39
|
end
|
40
40
|
|
@@ -93,7 +93,7 @@ module Fastlane
|
|
93
93
|
description: "The type of this version bump. Available: patch, minor, major",
|
94
94
|
default_value: "patch",
|
95
95
|
verify_block: proc do |value|
|
96
|
-
|
96
|
+
UI.user_error!("Available values are 'patch', 'minor' and 'major'") unless ['patch', 'minor', 'major'].include? value
|
97
97
|
end),
|
98
98
|
FastlaneCore::ConfigItem.new(key: :version_number,
|
99
99
|
env_name: "FL_VERSION_NUMBER_VERSION_NUMBER",
|
@@ -104,8 +104,8 @@ module Fastlane
|
|
104
104
|
env_name: "FL_VERSION_NUMBER_PROJECT",
|
105
105
|
description: "optional, you must specify the path to your main Xcode project if it is not in the project root directory",
|
106
106
|
verify_block: proc do |value|
|
107
|
-
|
108
|
-
|
107
|
+
UI.user_error!("Please pass the path to the project, not the workspace") if value.end_with? ".xcworkspace"
|
108
|
+
UI.user_error!("Could not find Xcode project") unless File.exist?(value)
|
109
109
|
end,
|
110
110
|
optional: true)
|
111
111
|
]
|
@@ -5,7 +5,7 @@ module Fastlane
|
|
5
5
|
class InstallOnDeviceAction < Action
|
6
6
|
def self.run(params)
|
7
7
|
unless Helper.test?
|
8
|
-
|
8
|
+
UI.user_error!("ios-deploy not installed, see https://github.com/phonegap/ios-deploy for instructions") if `which ios-deploy`.length == 0
|
9
9
|
end
|
10
10
|
taxi_cmd = [
|
11
11
|
"ios-deploy",
|
@@ -60,8 +60,8 @@ module Fastlane
|
|
60
60
|
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] || Dir["*.ipa"].first,
|
61
61
|
verify_block: proc do |value|
|
62
62
|
unless Helper.test?
|
63
|
-
|
64
|
-
|
63
|
+
UI.user_error!("Could not find ipa file at path '#{value}'") unless File.exist? value
|
64
|
+
UI.user_error!("'#{value}' doesn't seem to be an ipa file") unless value.end_with? ".ipa"
|
65
65
|
end
|
66
66
|
end
|
67
67
|
)
|
@@ -28,8 +28,8 @@ module Fastlane
|
|
28
28
|
env_name: "FL_XCODE_PLUGIN_URL",
|
29
29
|
description: "URL for Xcode plugin ZIP file",
|
30
30
|
verify_block: proc do |value|
|
31
|
-
|
32
|
-
|
31
|
+
UI.user_error!("No URL for InstallXcodePluginAction given, pass using `url: 'url'`") if value.to_s.length == 0
|
32
|
+
UI.user_error!("URL doesn't use HTTPS") unless value.start_with?("https://")
|
33
33
|
end)
|
34
34
|
]
|
35
35
|
end
|
@@ -17,7 +17,7 @@ module Fastlane
|
|
17
17
|
Actions.lane_context[SharedValues::INSTALLR_BUILD_INFORMATION] = response.body
|
18
18
|
UI.success('Build successfully uploaded to Installr!')
|
19
19
|
else
|
20
|
-
|
20
|
+
UI.user_error!("Error when trying to upload build file to Installr: #{response.body}")
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
@@ -69,14 +69,14 @@ module Fastlane
|
|
69
69
|
env_name: "INSTALLR_API_TOKEN",
|
70
70
|
description: "API Token for Installr Access",
|
71
71
|
verify_block: proc do |value|
|
72
|
-
|
72
|
+
UI.user_error!("No API token for Installr given, pass using `api_token: 'token'`") unless value and !value.empty?
|
73
73
|
end),
|
74
74
|
FastlaneCore::ConfigItem.new(key: :ipa,
|
75
75
|
env_name: "INSTALLR_IPA_PATH",
|
76
76
|
description: "Path to your IPA file. Optional if you use the `gym` or `xcodebuild` action",
|
77
77
|
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
|
78
78
|
verify_block: proc do |value|
|
79
|
-
|
79
|
+
UI.user_error!("Couldn't find build file at path '#{value}'") unless File.exist?(value)
|
80
80
|
end),
|
81
81
|
FastlaneCore::ConfigItem.new(key: :notes,
|
82
82
|
env_name: "INSTALLR_NOTES",
|
data/lib/fastlane/actions/ipa.rb
CHANGED
@@ -89,7 +89,7 @@ module Fastlane
|
|
89
89
|
end
|
90
90
|
|
91
91
|
# Raise a custom exception, as the the normal one is useless for the user
|
92
|
-
|
92
|
+
UI.user_error!("A build error occured, this is usually related to code signing. Take a look at the error above")
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
@@ -33,7 +33,7 @@ module Fastlane
|
|
33
33
|
begin
|
34
34
|
build_number = train.builds.map(&:build_version).map(&:to_i).sort.last
|
35
35
|
rescue
|
36
|
-
|
36
|
+
UI.user_error!("could not find a build on iTC - and 'initial_build_number' option is not set") unless params[:initial_build_number]
|
37
37
|
build_number = params[:initial_build_number]
|
38
38
|
end
|
39
39
|
|
@@ -8,7 +8,7 @@ module Fastlane
|
|
8
8
|
|
9
9
|
def self.run(options)
|
10
10
|
unless Helper.test?
|
11
|
-
|
11
|
+
UI.user_error!("lcov not installed, please install using `brew install lcov`") if `which lcov`.length == 0
|
12
12
|
end
|
13
13
|
gen_cov(options)
|
14
14
|
end
|
@@ -74,7 +74,7 @@ module Fastlane
|
|
74
74
|
optional: false,
|
75
75
|
verify_block: proc do |value|
|
76
76
|
file_path = File.expand_path(value)
|
77
|
-
|
77
|
+
UI.user_error!("Couldn't find file at path '#{file_path}'") unless File.exist?(file_path)
|
78
78
|
end),
|
79
79
|
FastlaneCore::ConfigItem.new(key: :repo_id,
|
80
80
|
env_name: "FL_NEXUS_REPO_ID",
|
@@ -9,11 +9,11 @@ module Fastlane
|
|
9
9
|
def self.run(params)
|
10
10
|
oclint_path = params[:oclint_path]
|
11
11
|
if `which #{oclint_path}`.to_s.empty? and !Helper.test?
|
12
|
-
|
12
|
+
UI.user_error!("You have to install oclint or provide path to oclint binary. Fore more details: ") + "http://docs.oclint.org/en/stable/intro/installation.html".yellow
|
13
13
|
end
|
14
14
|
|
15
15
|
compile_commands = params[:compile_commands]
|
16
|
-
|
16
|
+
UI.user_error!("Could not find json compilation database at path '#{compile_commands}'") unless File.exist?(compile_commands)
|
17
17
|
|
18
18
|
if params[:select_reqex]
|
19
19
|
UI.important("'select_reqex' paramter is deprecated. Please use 'select_regex' instead.")
|
@@ -51,7 +51,7 @@ module Fastlane
|
|
51
51
|
when 200, 204
|
52
52
|
puts "Succesfully created new OneSignal app".green
|
53
53
|
else
|
54
|
-
|
54
|
+
UI.user_error!("Unexpected #{response.code} with response: #{response.body}")
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
@@ -71,7 +71,7 @@ module Fastlane
|
|
71
71
|
verify_block: proc do |value|
|
72
72
|
unless value.to_s.length > 0
|
73
73
|
UI.error("Please add 'ENV[\"ONE_SIGNAL_AUTH_KEY\"] = \"your token\"' to your Fastfile's `before_all` section.")
|
74
|
-
|
74
|
+
UI.user_error!("No ONE_SIGNAL_AUTH_KEY given.")
|
75
75
|
end
|
76
76
|
end),
|
77
77
|
|
@@ -81,7 +81,7 @@ module Fastlane
|
|
81
81
|
verify_block: proc do |value|
|
82
82
|
unless value.to_s.length > 0
|
83
83
|
UI.error("Please add 'ENV[\"ONE_SIGNAL_APP_NAME\"] = \"Your app name\"' to your Fastfile's `before_all` section.")
|
84
|
-
|
84
|
+
UI.user_error!("No ONE_SIGNAL_APP_NAME given.")
|
85
85
|
end
|
86
86
|
end),
|
87
87
|
|
@@ -45,8 +45,8 @@ module Fastlane
|
|
45
45
|
description: "The Podspec you want to push",
|
46
46
|
optional: true,
|
47
47
|
verify_block: proc do |value|
|
48
|
-
|
49
|
-
|
48
|
+
UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
|
49
|
+
UI.user_error!("File must be a `.podspec`") unless value.end_with?(".podspec")
|
50
50
|
end),
|
51
51
|
FastlaneCore::ConfigItem.new(key: :repo,
|
52
52
|
description: "The repo you want to push. Pushes to Trunk by default",
|
@@ -60,7 +60,7 @@ module Fastlane
|
|
60
60
|
optional: true,
|
61
61
|
is_string: false,
|
62
62
|
verify_block: proc do |value|
|
63
|
-
|
63
|
+
UI.user_error!("Sources must be an array.") unless value.kind_of?(Array)
|
64
64
|
end)
|
65
65
|
]
|
66
66
|
end
|
@@ -39,41 +39,41 @@ module Fastlane
|
|
39
39
|
description: 'Client ID for Podio API (see https://developers.podio.com/api-key)',
|
40
40
|
is_string: true,
|
41
41
|
verify_block: proc do |value|
|
42
|
-
|
42
|
+
UI.user_error!("No Client ID for Podio given, pass using `client_id: 'id'`") unless value && !value.empty?
|
43
43
|
end),
|
44
44
|
FastlaneCore::ConfigItem.new(key: :client_secret,
|
45
45
|
env_name: 'PODIO_ITEM_CLIENT_SECRET',
|
46
46
|
description: 'Client secret for Podio API (see https://developers.podio.com/api-key)',
|
47
47
|
is_string: true,
|
48
48
|
verify_block: proc do |value|
|
49
|
-
|
49
|
+
UI.user_error!("No Client Secret for Podio given, pass using `client_secret: 'secret'`") unless value && !value.empty?
|
50
50
|
end),
|
51
51
|
FastlaneCore::ConfigItem.new(key: :app_id,
|
52
52
|
env_name: 'PODIO_ITEM_APP_ID',
|
53
53
|
description: 'App ID of the app you intend to authenticate with (see https://developers.podio.com/authentication/app_auth)',
|
54
54
|
is_string: true,
|
55
55
|
verify_block: proc do |value|
|
56
|
-
|
56
|
+
UI.user_error!("No App ID for Podio given, pass using `app_id: 'id'`") unless value && !value.empty?
|
57
57
|
end),
|
58
58
|
FastlaneCore::ConfigItem.new(key: :app_token,
|
59
59
|
env_name: 'PODIO_ITEM_APP_TOKEN',
|
60
60
|
description: 'App token of the app you intend to authenticate with (see https://developers.podio.com/authentication/app_auth)',
|
61
61
|
is_string: true,
|
62
62
|
verify_block: proc do |value|
|
63
|
-
|
63
|
+
UI.user_error!("No App token for Podio given, pass using `app_token: 'token'`") unless value && !value.empty?
|
64
64
|
end),
|
65
65
|
FastlaneCore::ConfigItem.new(key: :identifying_field,
|
66
66
|
env_name: 'PODIO_ITEM_IDENTIFYING_FIELD',
|
67
67
|
description: 'String specifying the field key used for identification of an item',
|
68
68
|
is_string: true,
|
69
69
|
verify_block: proc do |value|
|
70
|
-
|
70
|
+
UI.user_error!("No Identifying field given, pass using `identifying_field: 'field name'`") unless value && !value.empty?
|
71
71
|
end),
|
72
72
|
FastlaneCore::ConfigItem.new(key: :identifying_value,
|
73
73
|
description: 'String uniquely specifying an item within the app',
|
74
74
|
is_string: true,
|
75
75
|
verify_block: proc do |value|
|
76
|
-
|
76
|
+
UI.user_error!("No Identifying value given, pass using `identifying_value: 'unique value'`") unless value && !value.empty?
|
77
77
|
end),
|
78
78
|
FastlaneCore::ConfigItem.new(key: :other_fields,
|
79
79
|
description: 'Dictionary of your app fields. Podio supports several field types, see https://developers.podio.com/doc/items',
|
@@ -131,7 +131,7 @@ module Fastlane
|
|
131
131
|
app_token: app_token,
|
132
132
|
client_id: client_id,
|
133
133
|
client_secret: client_secret
|
134
|
-
|
134
|
+
UI.user_error!("Failed to authenticate with Podio API") if auth_response.code != 200
|
135
135
|
|
136
136
|
auth_response_dictionary = JSON.parse(auth_response.body)
|
137
137
|
access_token = auth_response_dictionary['access_token']
|
@@ -152,7 +152,7 @@ module Fastlane
|
|
152
152
|
def self.get_existing_item(auth_config, identifying_value, app_id)
|
153
153
|
filter_request_body = { query: identifying_value, limit: 1, ref_type: 'item' }.to_json
|
154
154
|
filter_response = RestClient.post "#{BASE_URL}/search/app/#{app_id}/", filter_request_body, auth_config
|
155
|
-
|
155
|
+
UI.user_error!("Failed to search for already existing item #{identifying_value}") if filter_response.code != 200
|
156
156
|
|
157
157
|
existing_items = JSON.parse(filter_response.body)
|
158
158
|
existing_item_id = nil
|
@@ -171,7 +171,7 @@ module Fastlane
|
|
171
171
|
def self.create_item(auth_config, identifying_field, identifying_value, app_id)
|
172
172
|
item_request_body = { fields: { identifying_field => identifying_value } }.to_json
|
173
173
|
item_response = RestClient.post "#{BASE_URL}/item/app/#{app_id}", item_request_body, auth_config
|
174
|
-
|
174
|
+
UI.user_error!("Failed to create item \"#{identifying_value}\"") if item_response.code != 200
|
175
175
|
|
176
176
|
item_response_dictionary = JSON.parse(item_response.body)
|
177
177
|
[item_response_dictionary['item_id'], item_response_dictionary['link']]
|
@@ -181,14 +181,14 @@ module Fastlane
|
|
181
181
|
if fields.length > 0
|
182
182
|
item_request_body = { fields: fields }.to_json
|
183
183
|
item_response = RestClient.put "#{BASE_URL}/item/#{item_id}", item_request_body, auth_config
|
184
|
-
|
184
|
+
UI.user_error!("Failed to update item values \"#{fields}\"") unless item_response.code != 200 || item_response.code != 204
|
185
185
|
end
|
186
186
|
end
|
187
187
|
|
188
188
|
def self.get_embed_id(auth_config, url)
|
189
189
|
embed_request_body = { url: url }.to_json
|
190
190
|
embed_response = RestClient.post "#{BASE_URL}/embed/", embed_request_body, auth_config
|
191
|
-
|
191
|
+
UI.user_error!("Failed to create embed for link #{link}") if embed_response.code != 200
|
192
192
|
|
193
193
|
embed_response_dictionary = JSON.parse(embed_response.body)
|
194
194
|
embed_response_dictionary['embed_id']
|