fastlane 1.66.0 → 1.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +37 -38
- data/lib/assets/AppfileTemplate +1 -1
- data/lib/assets/DefaultFastfileTemplate +2 -2
- data/lib/assets/FastfileTemplateAndroid +2 -2
- data/lib/assets/custom_action_template.rb +1 -1
- data/lib/fastlane/actions/actions_helper.rb +2 -2
- data/lib/fastlane/actions/appetize.rb +15 -16
- data/lib/fastlane/actions/appium.rb +1 -1
- data/lib/fastlane/actions/appledoc.rb +3 -3
- data/lib/fastlane/actions/artifactory.rb +7 -7
- data/lib/fastlane/actions/backup_file.rb +1 -1
- data/lib/fastlane/actions/backup_xcarchive.rb +1 -1
- data/lib/fastlane/actions/bundle_install.rb +2 -2
- data/lib/fastlane/actions/cert.rb +1 -1
- data/lib/fastlane/actions/changelog_from_git_commits.rb +2 -2
- data/lib/fastlane/actions/chatwork.rb +2 -2
- data/lib/fastlane/actions/clean_build_artifacts.rb +3 -2
- data/lib/fastlane/actions/clean_cocoapods_cache.rb +1 -1
- data/lib/fastlane/actions/clear_derived_data.rb +2 -2
- data/lib/fastlane/actions/clipboard.rb +1 -1
- data/lib/fastlane/actions/commit_version_bump.rb +3 -3
- data/lib/fastlane/actions/copy_artifacts.rb +2 -2
- data/lib/fastlane/actions/crashlytics.rb +6 -6
- data/lib/fastlane/actions/create_pull_request.rb +3 -3
- data/lib/fastlane/actions/deploygate.rb +6 -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 +117 -0
- data/lib/fastlane/actions/ensure_git_branch.rb +1 -1
- data/lib/fastlane/actions/ensure_git_status_clean.rb +1 -1
- data/lib/fastlane/actions/ensure_no_debug_code.rb +26 -12
- data/lib/fastlane/actions/ensure_xcode_version.rb +3 -3
- data/lib/fastlane/actions/erb.rb +1 -1
- data/lib/fastlane/actions/fastlane_version.rb +1 -1
- data/lib/fastlane/actions/frameit.rb +1 -1
- data/lib/fastlane/actions/gcovr.rb +2 -2
- data/lib/fastlane/actions/get_build_number.rb +1 -1
- data/lib/fastlane/actions/get_github_release.rb +6 -6
- data/lib/fastlane/actions/get_info_plist_value.rb +2 -2
- data/lib/fastlane/actions/get_ipa_info_plist_value.rb +2 -2
- data/lib/fastlane/actions/get_version_number.rb +1 -1
- data/lib/fastlane/actions/git_add.rb +1 -1
- data/lib/fastlane/actions/git_commit.rb +1 -1
- data/lib/fastlane/actions/gradle.rb +2 -2
- data/lib/fastlane/actions/gym.rb +1 -1
- data/lib/fastlane/actions/hg_add_tag.rb +1 -1
- data/lib/fastlane/actions/hg_commit_version_bump.rb +3 -3
- data/lib/fastlane/actions/hg_ensure_clean_status.rb +1 -1
- data/lib/fastlane/actions/hg_push.rb +1 -1
- data/lib/fastlane/actions/hipchat.rb +4 -6
- data/lib/fastlane/actions/hockey.rb +4 -4
- data/lib/fastlane/actions/ifttt.rb +74 -0
- data/lib/fastlane/actions/increment_build_number.rb +1 -1
- data/lib/fastlane/actions/increment_version_number.rb +3 -3
- data/lib/fastlane/actions/install_on_device.rb +1 -1
- data/lib/fastlane/actions/install_xcode_plugin.rb +2 -2
- data/lib/fastlane/actions/installr.rb +2 -2
- data/lib/fastlane/actions/ipa.rb +8 -8
- data/lib/fastlane/actions/latest_testflight_build_number.rb +3 -3
- data/lib/fastlane/actions/lcov.rb +1 -1
- data/lib/fastlane/actions/mailgun.rb +1 -1
- data/lib/fastlane/actions/match.rb +2 -2
- data/lib/fastlane/actions/notify.rb +1 -1
- data/lib/fastlane/actions/oclint.rb +2 -2
- data/lib/fastlane/actions/onesignal.rb +3 -3
- data/lib/fastlane/actions/opt_out_usage.rb +1 -1
- data/lib/fastlane/actions/pilot.rb +1 -1
- data/lib/fastlane/actions/pod_push.rb +2 -2
- data/lib/fastlane/actions/produce.rb +1 -1
- data/lib/fastlane/actions/prompt.rb +3 -3
- data/lib/fastlane/actions/push_git_tags.rb +1 -1
- data/lib/fastlane/actions/push_to_git_remote.rb +1 -1
- data/lib/fastlane/actions/read_podspec.rb +1 -1
- data/lib/fastlane/actions/recreate_schemes.rb +1 -1
- data/lib/fastlane/actions/register_devices.rb +2 -2
- data/lib/fastlane/actions/reset_git_repo.rb +3 -3
- data/lib/fastlane/actions/resign.rb +7 -2
- data/lib/fastlane/actions/restore_file.rb +1 -1
- data/lib/fastlane/actions/rocket.rb +64 -0
- data/lib/fastlane/actions/s3.rb +33 -101
- data/lib/fastlane/actions/scan.rb +1 -1
- data/lib/fastlane/actions/scp.rb +2 -2
- data/lib/fastlane/actions/set_changelog.rb +12 -12
- data/lib/fastlane/actions/set_github_release.rb +14 -14
- data/lib/fastlane/actions/set_info_plist_value.rb +2 -2
- data/lib/fastlane/actions/sigh.rb +1 -1
- data/lib/fastlane/actions/slack.rb +2 -2
- data/lib/fastlane/actions/ssh.rb +4 -4
- data/lib/fastlane/actions/supply.rb +1 -1
- data/lib/fastlane/actions/team_id.rb +1 -1
- data/lib/fastlane/actions/team_name.rb +1 -1
- data/lib/fastlane/actions/testfairy.rb +4 -4
- data/lib/fastlane/actions/testmunk.rb +3 -3
- data/lib/fastlane/actions/tryouts.rb +3 -3
- data/lib/fastlane/actions/twitter.rb +1 -1
- data/lib/fastlane/actions/typetalk.rb +1 -1
- data/lib/fastlane/actions/update_app_group_identifiers.rb +4 -4
- data/lib/fastlane/actions/update_app_identifier.rb +4 -4
- data/lib/fastlane/actions/update_fastlane.rb +22 -13
- data/lib/fastlane/actions/update_info_plist.rb +4 -4
- data/lib/fastlane/actions/update_project_code_signing.rb +5 -5
- data/lib/fastlane/actions/update_project_provisioning.rb +10 -10
- data/lib/fastlane/actions/update_project_team.rb +2 -2
- data/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +104 -0
- data/lib/fastlane/actions/upload_symbols_to_sentry.rb +119 -0
- data/lib/fastlane/actions/verify_pod_keys.rb +2 -2
- data/lib/fastlane/actions/verify_xcode.rb +10 -10
- data/lib/fastlane/actions/xcode_install.rb +2 -2
- data/lib/fastlane/actions/xcode_select.rb +1 -1
- data/lib/fastlane/actions/xcode_server_get_assets.rb +8 -8
- data/lib/fastlane/actions/xcodebuild.rb +7 -7
- data/lib/fastlane/actions/xcov.rb +6 -0
- data/lib/fastlane/actions/xctool.rb +2 -2
- data/lib/fastlane/command_line_handler.rb +1 -1
- data/lib/fastlane/configuration_helper.rb +2 -2
- data/lib/fastlane/core_ext/bundler_monkey_patch.rb +14 -0
- data/lib/fastlane/core_ext/string.rb +4 -4
- data/lib/fastlane/documentation/actions_list.rb +2 -2
- data/lib/fastlane/documentation/docs_generator.rb +3 -3
- data/lib/fastlane/fast_file.rb +6 -6
- data/lib/fastlane/helper/crashlytics_helper.rb +1 -1
- data/lib/fastlane/helper/git_helper.rb +2 -2
- data/lib/fastlane/one_off.rb +1 -1
- data/lib/fastlane/runner.rb +1 -1
- data/lib/fastlane/setup/setup.rb +7 -7
- data/lib/fastlane/setup/setup_android.rb +13 -13
- data/lib/fastlane/setup/setup_ios.rb +24 -27
- data/lib/fastlane/version.rb +1 -1
- metadata +66 -32
data/lib/fastlane/actions/scp.rb
CHANGED
@@ -12,12 +12,12 @@ module Fastlane
|
|
12
12
|
Net::SCP.start(params[:host], params[:username], {port: params[:port].to_i, password: params[:password]}) do |scp|
|
13
13
|
if params[:upload]
|
14
14
|
scp.upload! params[:upload][:src], params[:upload][:dst], recursive: true
|
15
|
-
|
15
|
+
UI.message(['[SCP COMMAND]', "Successfully Uploaded", params[:upload][:src], params[:upload][:dst]].join(': '))
|
16
16
|
end
|
17
17
|
if params[:download]
|
18
18
|
|
19
19
|
t_ret = scp.download! params[:download][:src], params[:download][:dst], recursive: true
|
20
|
-
|
20
|
+
UI.message(['[SCP COMMAND]', "Successfully Downloaded", params[:upload][:src], params[:upload][:dst]].join(': '))
|
21
21
|
unless params[:download][:dst]
|
22
22
|
ret = t_ret
|
23
23
|
end
|
@@ -10,43 +10,43 @@ module Fastlane
|
|
10
10
|
version_number = params[:version]
|
11
11
|
unless version_number
|
12
12
|
# Automatically fetch the latest version
|
13
|
-
|
13
|
+
UI.message("Fetching the latest version for this app")
|
14
14
|
if app.edit_version and app.edit_version.version
|
15
15
|
version_number = app.edit_version.version
|
16
16
|
else
|
17
|
-
|
17
|
+
UI.message("You have to specify a new version number: ")
|
18
18
|
version_number = STDIN.gets.strip
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
|
22
|
+
UI.message("Going to update version #{version_number}")
|
23
23
|
|
24
24
|
changelog = params[:changelog]
|
25
25
|
unless changelog
|
26
26
|
path = "./fastlane/changelog.txt"
|
27
|
-
|
27
|
+
UI.message("Looking for changelog in '#{path}'...")
|
28
28
|
if File.exist? path
|
29
29
|
changelog = File.read(path)
|
30
30
|
else
|
31
|
-
|
32
|
-
|
31
|
+
UI.error("Couldn't find changelog.txt")
|
32
|
+
UI.message("Please enter the changelog here:")
|
33
33
|
changelog = STDIN.gets
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
|
37
|
+
UI.important("Going to update the changelog to:\n\n#{changelog}\n\n")
|
38
38
|
|
39
39
|
if (v = app.edit_version)
|
40
40
|
if v.version != version_number
|
41
41
|
# Version is already there, make sure it matches the one we want to create
|
42
|
-
|
42
|
+
UI.message("Changing existing version number from '#{v.version}' to '#{version_number}'")
|
43
43
|
v.version = version_number
|
44
44
|
v.save!
|
45
45
|
else
|
46
|
-
|
46
|
+
UI.message("Updating changelog for existing version #{v.version}")
|
47
47
|
end
|
48
48
|
else
|
49
|
-
|
49
|
+
UI.message("Creating the new version: #{version_number}")
|
50
50
|
app.create_version!(version_number)
|
51
51
|
app = Spaceship::Application.find(params[:app_identifier]) # Replace with .reload method once available
|
52
52
|
v = app.edit_version
|
@@ -55,10 +55,10 @@ module Fastlane
|
|
55
55
|
v.release_notes.languages.each do |lang|
|
56
56
|
v.release_notes[lang] = changelog
|
57
57
|
end
|
58
|
-
|
58
|
+
UI.message("Uploading changes to iTunes Connect...")
|
59
59
|
v.save!
|
60
60
|
|
61
|
-
|
61
|
+
UI.success("👼 Successfully pushed the new changelog to #{v.url}")
|
62
62
|
end
|
63
63
|
|
64
64
|
#####################################################
|
@@ -10,8 +10,8 @@ module Fastlane
|
|
10
10
|
|
11
11
|
class SetGithubReleaseAction < Action
|
12
12
|
def self.run(params)
|
13
|
-
|
14
|
-
|
13
|
+
UI.important("Creating release of #{params[:repository_name]} on tag \"#{params[:tag_name]}\" with name \"#{params[:name]}\".")
|
14
|
+
UI.important("Will also upload assets #{params[:upload_assets]}.") if params[:upload_assets]
|
15
15
|
|
16
16
|
require 'json'
|
17
17
|
body_obj = {
|
@@ -34,11 +34,11 @@ module Fastlane
|
|
34
34
|
|
35
35
|
case response[:status]
|
36
36
|
when 201
|
37
|
-
|
37
|
+
UI.success("Successfully created release at tag \"#{params[:tag_name]}\" on GitHub")
|
38
38
|
body = JSON.parse(response.body)
|
39
39
|
html_url = body['html_url']
|
40
40
|
release_id = body['id']
|
41
|
-
|
41
|
+
UI.important("See release at \"#{html_url}\"")
|
42
42
|
Actions.lane_context[SharedValues::SET_GITHUB_RELEASE_HTML_LINK] = html_url
|
43
43
|
Actions.lane_context[SharedValues::SET_GITHUB_RELEASE_RELEASE_ID] = release_id
|
44
44
|
Actions.lane_context[SharedValues::SET_GITHUB_RELEASE_JSON] = body
|
@@ -51,29 +51,29 @@ module Fastlane
|
|
51
51
|
# fetch the release again, so that it contains the uploaded assets
|
52
52
|
get_response = self.call_releases_endpoint("get", server_url, repo_name, "/releases/#{release_id}", api_token, nil)
|
53
53
|
if get_response[:status] != 200
|
54
|
-
|
54
|
+
UI.error("GitHub responded with #{response[:status]}:#{response[:body]}")
|
55
55
|
raise "Failed to fetch the newly created release, but it *has been created* successfully.".red
|
56
56
|
end
|
57
57
|
|
58
58
|
get_body = JSON.parse(get_response.body)
|
59
59
|
Actions.lane_context[SharedValues::SET_GITHUB_RELEASE_JSON] = get_body
|
60
|
-
|
60
|
+
UI.success("Successfully uploaded assets #{assets} to release \"#{html_url}\"")
|
61
61
|
return get_body
|
62
62
|
else
|
63
63
|
return body
|
64
64
|
end
|
65
65
|
when 422
|
66
|
-
|
67
|
-
|
66
|
+
UI.error(response.body)
|
67
|
+
UI.error("Release on tag #{params[:tag_name]} already exists!")
|
68
68
|
when 404
|
69
|
-
|
69
|
+
UI.error(response.body)
|
70
70
|
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
|
71
71
|
when 401
|
72
|
-
|
72
|
+
UI.error(response.body)
|
73
73
|
raise "You are not authorized to access #{params[:repository_name]}, please make sure you provided a valid API token.".red
|
74
74
|
else
|
75
75
|
if response[:status] != 200
|
76
|
-
|
76
|
+
UI.error("GitHub responded with #{response[:status]}:#{response[:body]}")
|
77
77
|
end
|
78
78
|
end
|
79
79
|
return nil
|
@@ -114,16 +114,16 @@ module Fastlane
|
|
114
114
|
headers = self.headers(api_token)
|
115
115
|
headers['Content-Type'] = 'application/zip' # how do we detect other types e.g. other binary files? file extensions?
|
116
116
|
|
117
|
-
|
117
|
+
UI.important("Uploading #{name}")
|
118
118
|
response = self.call_endpoint(expanded_url, "post", headers, File.read(file))
|
119
119
|
|
120
120
|
# inspect the response
|
121
121
|
case response.status
|
122
122
|
when 201
|
123
123
|
# all good in the hood
|
124
|
-
|
124
|
+
UI.success("Successfully uploaded #{name}.")
|
125
125
|
else
|
126
|
-
|
126
|
+
UI.error("GitHub responded with #{response[:status]}:#{response[:body]}")
|
127
127
|
raise "Failed to upload asset #{name} to GitHub."
|
128
128
|
end
|
129
129
|
end
|
@@ -38,7 +38,7 @@ module Fastlane
|
|
38
38
|
profile_type = "development" if values[:development]
|
39
39
|
profile_type = "enterprise" if enterprise
|
40
40
|
|
41
|
-
|
41
|
+
UI.message("Setting Provisioning Profile type to '#{profile_type}'")
|
42
42
|
|
43
43
|
Actions.lane_context[SharedValues::SIGH_PROFILE_TYPE] = profile_type
|
44
44
|
end
|
@@ -44,9 +44,9 @@ module Fastlane
|
|
44
44
|
attachments: [slack_attachment]
|
45
45
|
|
46
46
|
if result.code.to_i == 200
|
47
|
-
|
47
|
+
UI.success('Successfully sent Slack notification')
|
48
48
|
else
|
49
|
-
|
49
|
+
UI.verbose(result)
|
50
50
|
raise 'Error pushing Slack message, maybe the integration has no permission to post on this channel? Try removing the channel parameter in your Fastfile.'.red
|
51
51
|
end
|
52
52
|
end
|
data/lib/fastlane/actions/ssh.rb
CHANGED
@@ -48,17 +48,17 @@ module Fastlane
|
|
48
48
|
|
49
49
|
Net::SSH.start(params[:host], params[:username], {port: params[:port].to_i, password: params[:password]}) do |ssh|
|
50
50
|
params[:commands].each do |cmd|
|
51
|
-
|
51
|
+
UI.important(['[SSH COMMAND]', cmd].join(': ')) if params[:log]
|
52
52
|
return_value = ssh_exec!(ssh, cmd)
|
53
|
-
|
53
|
+
UI.error("SSH Command failed '#{cmd}' Exit-Code: #{return_value[:exit_code]}") if return_value[:exit_code] > 0
|
54
54
|
raise "SSH Command failed" if return_value[:exit_code] > 0
|
55
55
|
|
56
56
|
stderr << return_value[:stderr]
|
57
57
|
stdout << return_value[:stdout]
|
58
58
|
end
|
59
59
|
end
|
60
|
-
|
61
|
-
|
60
|
+
UI.message("Succesfully executed #{params[:commands].count} commands on host: #{params[:host]}")
|
61
|
+
UI.message("\n########### \n #{stdout} \n###############".magenta) if params[:log]
|
62
62
|
Actions.lane_context[SharedValues::SSH_STDOUT_VALUE] = stdout
|
63
63
|
Actions.lane_context[SharedValues::SSH_STDERR_VALUE] = stderr
|
64
64
|
return {stdout: Actions.lane_context[SharedValues::SSH_STDOUT_VALUE], stderr: Actions.lane_context[SharedValues::SSH_STDERR_VALUE]}
|
@@ -9,7 +9,7 @@ module Fastlane
|
|
9
9
|
team = (params || []).first
|
10
10
|
raise "Please pass your Team ID (e.g. team_id 'Q2CBPK58CA')".red unless team.to_s.length > 0
|
11
11
|
|
12
|
-
|
12
|
+
UI.message("Setting Team ID to '#{team}' for all build steps")
|
13
13
|
|
14
14
|
[:CERT_TEAM_ID, :SIGH_TEAM_ID, :PEM_TEAM_ID, :PRODUCE_TEAM_ID, :SIGH_TEAM_ID, :FASTLANE_TEAM_ID].each do |current|
|
15
15
|
ENV[current.to_s] = team
|
@@ -9,7 +9,7 @@ module Fastlane
|
|
9
9
|
team = (params || []).first
|
10
10
|
raise "Please pass your Team Name (e.g. team_name 'Felix Krause')".red unless team.to_s.length > 0
|
11
11
|
|
12
|
-
|
12
|
+
UI.message("Setting Team Name to '#{team}' for all build steps")
|
13
13
|
|
14
14
|
[:FASTLANE_TEAM_NAME, :PRODUCE_TEAM_NAME].each do |current|
|
15
15
|
ENV[current.to_s] = team
|
@@ -9,7 +9,7 @@ module Fastlane
|
|
9
9
|
require 'shenzhen'
|
10
10
|
require 'shenzhen/plugins/testfairy'
|
11
11
|
|
12
|
-
|
12
|
+
UI.success('Starting with ipa upload to TestFairy...')
|
13
13
|
|
14
14
|
client = Shenzhen::Plugins::TestFairy::Client.new(
|
15
15
|
params[:api_key]
|
@@ -19,8 +19,8 @@ module Fastlane
|
|
19
19
|
|
20
20
|
response = client.upload_build(params[:ipa], params.values)
|
21
21
|
if parse_response(response)
|
22
|
-
|
23
|
-
|
22
|
+
UI.success("Build URL: #{Actions.lane_context[SharedValues::TESTFAIRY_BUILD_URL]}")
|
23
|
+
UI.success("Build successfully uploaded to TestFairy.")
|
24
24
|
else
|
25
25
|
raise 'Error when trying to upload ipa to TestFairy'.red
|
26
26
|
end
|
@@ -38,7 +38,7 @@ module Fastlane
|
|
38
38
|
|
39
39
|
return true
|
40
40
|
else
|
41
|
-
|
41
|
+
UI.error("Error uploading to TestFairy: #{response.body}")
|
42
42
|
|
43
43
|
return false
|
44
44
|
end
|
@@ -13,9 +13,9 @@ module Fastlane
|
|
13
13
|
module Actions
|
14
14
|
class TestmunkAction < Action
|
15
15
|
def self.run(config)
|
16
|
-
|
16
|
+
UI.success('Testmunk: Uploading the .ipa and starting your tests')
|
17
17
|
|
18
|
-
|
18
|
+
UI.success('Zipping features/ to features.zip')
|
19
19
|
zipped_features_path = File.expand_path('features.zip')
|
20
20
|
Actions.sh(%(zip -r "features" "features/"))
|
21
21
|
|
@@ -26,7 +26,7 @@ module Fastlane
|
|
26
26
|
" https://#{config[:api]}@api.testmunk.com/apps/#{config[:app]}/testruns")
|
27
27
|
|
28
28
|
if response
|
29
|
-
|
29
|
+
UI.success('Your tests are being executed right now. Please wait for the mail with results and decide if you want to continue.')
|
30
30
|
else
|
31
31
|
raise 'Something went wrong while uploading your app to Testmunk'.red
|
32
32
|
end
|
@@ -9,15 +9,15 @@ module Fastlane
|
|
9
9
|
TRYOUTS_API_BUILD_RELEASE_TEMPLATE = "https://api.tryouts.io/v1/applications/%s/releases/"
|
10
10
|
|
11
11
|
def self.run(params)
|
12
|
-
|
12
|
+
UI.success('Upload to Tryouts has been started. This may take some time.')
|
13
13
|
|
14
14
|
response = self.upload_build(params)
|
15
15
|
|
16
16
|
case response.status
|
17
17
|
when 200...300
|
18
18
|
Actions.lane_context[SharedValues::TRYOUTS_BUILD_INFORMATION] = response.body
|
19
|
-
|
20
|
-
|
19
|
+
UI.success('Build successfully uploaded to Tryouts!')
|
20
|
+
UI.message("Release download url: #{response.body['download_url']}") if response.body["download_url"]
|
21
21
|
else
|
22
22
|
raise "Error when trying to upload build file to Tryouts: #{response.body}".red
|
23
23
|
end
|
@@ -11,7 +11,7 @@ module Fastlane
|
|
11
11
|
config.access_token_secret = params[:access_token_secret]
|
12
12
|
end
|
13
13
|
client.update(params[:message])
|
14
|
-
|
14
|
+
UI.message(['[TWITTER]', "Successfully tweeted ", params[:message]].join(': '))
|
15
15
|
end
|
16
16
|
|
17
17
|
#####################################################
|
@@ -28,7 +28,7 @@ module Fastlane
|
|
28
28
|
|
29
29
|
self.post_to_typetalk(message, topic_id, typetalk_token)
|
30
30
|
|
31
|
-
|
31
|
+
UI.success('Successfully sent Typetalk notification')
|
32
32
|
end
|
33
33
|
|
34
34
|
def self.post_to_typetalk(message, topic_id, typetalk_token)
|
@@ -8,8 +8,8 @@ module Fastlane
|
|
8
8
|
require 'plist'
|
9
9
|
|
10
10
|
def self.run(params)
|
11
|
-
|
12
|
-
|
11
|
+
UI.message("Entitlements File: #{params[:entitlements_file]}")
|
12
|
+
UI.message("New App Group Identifiers: #{params[:app_group_identifiers]}")
|
13
13
|
|
14
14
|
entitlements_file = params[:entitlements_file]
|
15
15
|
raise "Could not find entitlements file at path '#{entitlements_file}'".red unless File.exist?(entitlements_file)
|
@@ -23,12 +23,12 @@ module Fastlane
|
|
23
23
|
raise 'No existing App group field specified. Please specify an App Group in the entitlements file.'.red unless app_group_field
|
24
24
|
|
25
25
|
# set new app group identifiers
|
26
|
-
|
26
|
+
UI.message("Old App Group Identifiers: #{app_group_field}")
|
27
27
|
result['com.apple.security.application-groups'] = params[:app_group_identifiers]
|
28
28
|
|
29
29
|
# save entitlements file
|
30
30
|
result.save_plist(entitlements_file)
|
31
|
-
|
31
|
+
UI.message("New App Group Identifiers set: #{result['com.apple.security.application-groups']}")
|
32
32
|
|
33
33
|
Actions.lane_context[SharedValues::APP_GROUP_IDENTIFIERS] = result['com.apple.security.application-groups']
|
34
34
|
end
|
@@ -34,7 +34,7 @@ module Fastlane
|
|
34
34
|
# Write changes to the file
|
35
35
|
project.save
|
36
36
|
|
37
|
-
|
37
|
+
UI.success("Updated #{params[:xcodeproj]} 💾.")
|
38
38
|
else
|
39
39
|
# Update plist value
|
40
40
|
plist['CFBundleIdentifier'] = params[:app_identifier]
|
@@ -43,7 +43,7 @@ module Fastlane
|
|
43
43
|
plist_string = Plist::Emit.dump(plist)
|
44
44
|
File.write(info_plist_path, plist_string)
|
45
45
|
|
46
|
-
|
46
|
+
UI.success("Updated #{params[:plist_path]} 💾.")
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
@@ -66,14 +66,14 @@ module Fastlane
|
|
66
66
|
description: "Path to your Xcode project",
|
67
67
|
default_value: Dir['*.xcodeproj'].first,
|
68
68
|
verify_block: proc do |value|
|
69
|
-
raise "Please pass the path to the project, not the workspace".red
|
69
|
+
raise "Please pass the path to the project, not the workspace".red unless value.end_with?(".xcodeproj")
|
70
70
|
raise "Could not find Xcode project".red unless File.exist?(value)
|
71
71
|
end),
|
72
72
|
FastlaneCore::ConfigItem.new(key: :plist_path,
|
73
73
|
env_name: "FL_UPDATE_APP_IDENTIFIER_PLIST_PATH",
|
74
74
|
description: "Path to info plist, relative to your Xcode project",
|
75
75
|
verify_block: proc do |value|
|
76
|
-
raise "Invalid plist file".red unless value[-6..-1].
|
76
|
+
raise "Invalid plist file".red unless value[-6..-1].casecmp(".plist").zero?
|
77
77
|
end),
|
78
78
|
FastlaneCore::ConfigItem.new(key: :app_identifier,
|
79
79
|
env_name: 'FL_UPDATE_APP_IDENTIFIER',
|
@@ -1,4 +1,3 @@
|
|
1
|
-
# rubocop:disable Metrics/AbcSize
|
2
1
|
require 'rubygems/spec_fetcher'
|
3
2
|
require 'rubygems/command_manager'
|
4
3
|
|
@@ -28,6 +27,7 @@ module Fastlane
|
|
28
27
|
"match"
|
29
28
|
]
|
30
29
|
|
30
|
+
# rubocop:disable Metrics/AbcSize
|
31
31
|
def self.run(options)
|
32
32
|
if options[:no_update]
|
33
33
|
return
|
@@ -37,11 +37,11 @@ module Fastlane
|
|
37
37
|
tools_to_update ||= all_installed_tools
|
38
38
|
|
39
39
|
if tools_to_update.count == 0
|
40
|
-
|
40
|
+
UI.error("No tools specified or couldn't find any installed fastlane.tools")
|
41
41
|
return
|
42
42
|
end
|
43
43
|
|
44
|
-
|
44
|
+
UI.message("Looking for updates for #{tools_to_update.join(', ')}...")
|
45
45
|
|
46
46
|
updater = Gem::CommandManager.instance[:update]
|
47
47
|
cleaner = Gem::CommandManager.instance[:cleanup]
|
@@ -49,9 +49,18 @@ module Fastlane
|
|
49
49
|
sudo_needed = !File.writable?(Gem.dir)
|
50
50
|
|
51
51
|
if sudo_needed
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
UI.important("It seems that your Gem directory is not writable by your current User.")
|
53
|
+
UI.important("Fastlane would need sudo rights to update itself, however, running 'sudo fastlane' is not recommended.")
|
54
|
+
UI.important("If you still want to use this action, please read the Actions.md documentation on a guide how to set this up.")
|
55
|
+
return
|
56
|
+
end
|
57
|
+
|
58
|
+
if updater.respond_to? :highest_installed_gems
|
59
|
+
UI.important "The update_fastlane action requires rubygems version 2.1.0 or greater."
|
60
|
+
UI.important "Please update your version of ruby gems before proceeding."
|
61
|
+
UI.command "gem install rubygems-update"
|
62
|
+
UI.command "update_rubygems"
|
63
|
+
UI.command "gem update --system"
|
55
64
|
return
|
56
65
|
end
|
57
66
|
|
@@ -59,7 +68,7 @@ module Fastlane
|
|
59
68
|
update_needed = updater.which_to_update(highest_versions, tools_to_update)
|
60
69
|
|
61
70
|
if update_needed.count == 0
|
62
|
-
|
71
|
+
UI.success("Nothing to update ✅")
|
63
72
|
return
|
64
73
|
end
|
65
74
|
|
@@ -71,12 +80,12 @@ module Fastlane
|
|
71
80
|
local_version = Gem::Version.new(highest_versions[tool].version)
|
72
81
|
update_url = FastlaneCore::UpdateChecker.generate_fetch_url(tool)
|
73
82
|
latest_version = FastlaneCore::UpdateChecker.fetch_latest(update_url)
|
74
|
-
|
83
|
+
UI.message("Updating #{tool} from #{local_version} to #{latest_version} ... 🚀")
|
75
84
|
|
76
85
|
# Approximate_recommendation will create a string like "~> 0.10" from a version 0.10.0, e.g. one that is valid for versions >= 0.10 and <1.0
|
77
86
|
updater.update_gem tool, Gem::Requirement.new(local_version.approximate_recommendation)
|
78
87
|
|
79
|
-
|
88
|
+
UI.message("Finished updating #{tool}")
|
80
89
|
end
|
81
90
|
|
82
91
|
all_updated_tools = updater.installer.installed_gems.select do |updated_tool|
|
@@ -84,17 +93,18 @@ module Fastlane
|
|
84
93
|
end
|
85
94
|
|
86
95
|
if all_updated_tools.empty?
|
87
|
-
|
96
|
+
UI.message("All fastlane tools are up-to-date!")
|
88
97
|
else
|
89
|
-
|
98
|
+
UI.message("Cleaning up old versions...")
|
90
99
|
cleaner.options[:args] = all_updated_tools.map(&:name)
|
91
100
|
cleaner.execute
|
92
|
-
|
101
|
+
UI.message("fastlane.tools successfully updated! I will now restart myself... 😴")
|
93
102
|
|
94
103
|
# Set no_update to true so we don't try to update again
|
95
104
|
exec "FL_NO_UPDATE=true #{$PROGRAM_NAME} #{ARGV.join ' '}"
|
96
105
|
end
|
97
106
|
end
|
107
|
+
# rubocop:enable Metrics/AbcSize
|
98
108
|
|
99
109
|
def self.all_installed_tools
|
100
110
|
Gem::Specification.select { |s| ALL_TOOLS.include? s.name }.map(&:name).uniq
|
@@ -128,4 +138,3 @@ module Fastlane
|
|
128
138
|
end
|
129
139
|
end
|
130
140
|
end
|
131
|
-
# rubocop:enable Metrics/AbcSize
|