fastlane 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/fastlane +25 -7
- data/lib/assets/custom_action_template.rb +35 -2
- data/lib/fastlane.rb +1 -3
- data/lib/fastlane/action.rb +37 -0
- data/lib/fastlane/actions/{README → README.md} +1 -1
- data/lib/fastlane/actions/add_git_tag.rb +18 -1
- data/lib/fastlane/actions/cert.rb +38 -18
- data/lib/fastlane/actions/clean_build_artifacts.rb +9 -1
- data/lib/fastlane/actions/commit_version_bump.rb +16 -1
- data/lib/fastlane/actions/crashlytics.rb +21 -1
- data/lib/fastlane/actions/deliver.rb +31 -13
- data/lib/fastlane/actions/deploygate.rb +26 -1
- data/lib/fastlane/actions/ensure_git_status_clean.rb +15 -1
- data/lib/fastlane/actions/fastlane_version.rb +9 -1
- data/lib/fastlane/actions/frameit.rb +20 -10
- data/lib/fastlane/actions/gcovr.rb +35 -1
- data/lib/fastlane/actions/hipchat.rb +19 -1
- data/lib/fastlane/actions/hockey.rb +27 -1
- data/lib/fastlane/actions/increment_build_number.rb +22 -1
- data/lib/fastlane/actions/increment_version_number.rb +30 -1
- data/lib/fastlane/actions/install_carthage.rb +9 -1
- data/lib/fastlane/actions/install_cocapods.rb +5 -1
- data/lib/fastlane/actions/ipa.rb +52 -13
- data/lib/fastlane/actions/notify.rb +9 -1
- data/lib/fastlane/actions/produce.rb +50 -8
- data/lib/fastlane/actions/push_to_git_remote.rb +18 -1
- data/lib/fastlane/actions/register_devices.rb +18 -1
- data/lib/fastlane/actions/reset_git_repo.rb +24 -1
- data/lib/fastlane/actions/resign.rb +17 -1
- data/lib/fastlane/actions/s3.rb +30 -2
- data/lib/fastlane/actions/say.rb +5 -1
- data/lib/fastlane/actions/sigh.rb +22 -6
- data/lib/fastlane/actions/slack.rb +19 -4
- data/lib/fastlane/actions/snapshot.rb +27 -6
- data/lib/fastlane/actions/team_id.rb +9 -1
- data/lib/fastlane/actions/team_name.rb +9 -1
- data/lib/fastlane/actions/testmunk.rb +17 -4
- data/lib/fastlane/actions/typetalk.rb +19 -1
- data/lib/fastlane/actions/update_project_code_signing.rb +13 -1
- data/lib/fastlane/actions/xcode_select.rb +10 -2
- data/lib/fastlane/actions/xcodebuild.rb +88 -8
- data/lib/fastlane/actions/xctool.rb +16 -1
- data/lib/fastlane/actions_list.rb +130 -0
- data/lib/fastlane/core_ext/string.rb +8 -0
- data/lib/fastlane/lane_manager.rb +17 -1
- data/lib/fastlane/version.rb +1 -1
- metadata +35 -19
@@ -4,7 +4,7 @@ module Fastlane
|
|
4
4
|
PRODUCE_APPLE_ID = :PRODUCE_APPLE_ID
|
5
5
|
end
|
6
6
|
|
7
|
-
class ProduceAction
|
7
|
+
class ProduceAction < Action
|
8
8
|
def self.run(params)
|
9
9
|
require 'produce'
|
10
10
|
|
@@ -17,18 +17,60 @@ module Fastlane
|
|
17
17
|
|
18
18
|
return if Helper.test?
|
19
19
|
|
20
|
-
|
21
|
-
# This should be executed in the fastlane folder
|
20
|
+
FastlaneCore::UpdateChecker.start_looking_for_update('produce')
|
22
21
|
|
23
|
-
|
24
|
-
|
22
|
+
begin
|
23
|
+
Dir.chdir(FastlaneFolder.path || Dir.pwd) do
|
24
|
+
# This should be executed in the fastlane folder
|
25
25
|
|
26
|
-
|
26
|
+
CredentialsManager::PasswordManager.shared_manager(ENV['PRODUCE_USERNAME']) if ENV['PRODUCE_USERNAME']
|
27
|
+
Produce::Config.shared_config # to ask for missing information right in the beginning
|
27
28
|
|
28
|
-
|
29
|
-
|
29
|
+
apple_id = Produce::Manager.start_producing.to_s
|
30
|
+
|
31
|
+
Actions.lane_context[SharedValues::PRODUCE_APPLE_ID] = apple_id
|
32
|
+
ENV['PRODUCE_APPLE_ID'] = apple_id
|
33
|
+
end
|
34
|
+
ensure
|
35
|
+
FastlaneCore::UpdateChecker.show_update_status('produce', Produce::VERSION)
|
30
36
|
end
|
31
37
|
end
|
38
|
+
|
39
|
+
def self.description
|
40
|
+
"Makes sure the given app identifier is created on the Dev Portal"
|
41
|
+
end
|
42
|
+
|
43
|
+
def details
|
44
|
+
[
|
45
|
+
'For more information about produce, visit its GitHub page:',
|
46
|
+
'https://github.com/KrauseFx/produce'
|
47
|
+
].join(' ')
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.available_options
|
51
|
+
[
|
52
|
+
['produce_app_identifier', 'The App Identifier of your app', 'PRODUCE_APP_IDENTIFIER'],
|
53
|
+
['produce_app_name', 'The name of your app', 'PRODUCE_APP_NAME'],
|
54
|
+
['produce_language', 'The app\'s default language', 'PRODUCE_LANGUAGE'],
|
55
|
+
['produce_version', 'The initial version of your app', 'PRODUCE_VERSION'],
|
56
|
+
['produce_sku', 'The SKU number of the app if it gets created', 'PRODUCE_SKU'],
|
57
|
+
['produce_team_name', 'optional: the name of your team', 'PRODUCE_TEAM_NAME'],
|
58
|
+
['produce_team_id', 'optional: the ID of your team', 'PRODUCE_TEAM_ID'],
|
59
|
+
['produce_username', 'optional: your Apple ID', 'PRODUCE_USERNAME'],
|
60
|
+
['skip_itc', 'Skip the creation on iTunes Connect', 'PRODUCE_SKIP_ITC'],
|
61
|
+
['skip_devcenter', 'Skip the creation on the Apple Developer Portal', 'PRODUCE_SKIP_DEVCENTER']
|
62
|
+
]
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.output
|
66
|
+
[
|
67
|
+
['PRODUCE_APPLE_ID', 'The Apple ID of the newly created app. You probably need it for `deliver`']
|
68
|
+
]
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.author
|
72
|
+
"KrauseFx"
|
73
|
+
end
|
32
74
|
end
|
33
75
|
end
|
34
76
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
3
|
# Adds a git tag to the current commit
|
4
|
-
class PushToGitRemoteAction
|
4
|
+
class PushToGitRemoteAction < Action
|
5
5
|
def self.run(params)
|
6
6
|
options = params.first
|
7
7
|
|
@@ -28,6 +28,23 @@ module Fastlane
|
|
28
28
|
|
29
29
|
Helper.log.info 'Sucesfully pushed to remote.'
|
30
30
|
end
|
31
|
+
|
32
|
+
def self.description
|
33
|
+
"Push local changes to the remote branch"
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.available_options
|
37
|
+
[
|
38
|
+
['remote', 'The remote to push to. Defaults to `origin`'],
|
39
|
+
['branch', 'The local branch to push from. Defaults to the current branch'],
|
40
|
+
['branch', 'The remote branch to push to. Defaults to the local branch'],
|
41
|
+
['force', 'Force push to remote. Defaults to false']
|
42
|
+
]
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.author
|
46
|
+
"lmirosevic"
|
47
|
+
end
|
31
48
|
end
|
32
49
|
end
|
33
50
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
|
-
class RegisterDevicesAction
|
3
|
+
class RegisterDevicesAction < Action
|
4
4
|
UDID_REGEXP = /^\h{40}$/
|
5
5
|
|
6
6
|
def self.run(params)
|
@@ -58,6 +58,23 @@ module Fastlane
|
|
58
58
|
Helper.log.info "Device list up to date, all #{device_objs.count} devices are already registered. Total devices registed: #{existing_devices.count}.".green
|
59
59
|
end
|
60
60
|
end
|
61
|
+
|
62
|
+
def self.description
|
63
|
+
"Registers new devices to the Apple Dev Portal"
|
64
|
+
end
|
65
|
+
|
66
|
+
def self.available_options
|
67
|
+
[
|
68
|
+
['devices', 'A hash of devices, with the name as key and the UDID as value'],
|
69
|
+
['device_file', 'Instead, you can proide a path containing all UDIDs'],
|
70
|
+
['team_id', 'optional: Your team ID'],
|
71
|
+
['username', 'optional: Your Apple ID']
|
72
|
+
]
|
73
|
+
end
|
74
|
+
|
75
|
+
def self.author
|
76
|
+
"lmirosevic"
|
77
|
+
end
|
61
78
|
end
|
62
79
|
end
|
63
80
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
3
|
# Does a hard reset and clean on the repo
|
4
|
-
class ResetGitRepoAction
|
4
|
+
class ResetGitRepoAction < Action
|
5
5
|
def self.run(params)
|
6
6
|
hash = params.first
|
7
7
|
if params.include?(:force) || hash[:force] || Actions.lane_context[SharedValues::GIT_REPO_WAS_CLEAN_ON_START]
|
@@ -22,6 +22,29 @@ module Fastlane
|
|
22
22
|
raise 'This is a destructive and potentially dangerous action. To protect from data loss, please add the `ensure_git_status_clean` action to the beginning of your lane, or if you\'re absolutely sure of what you\'re doing then call this action with the :force option.'.red
|
23
23
|
end
|
24
24
|
end
|
25
|
+
|
26
|
+
def self.description
|
27
|
+
"Resets git repo to a clean state by discarding uncommited changes"
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.details
|
31
|
+
[
|
32
|
+
"This action will reset your git repo to a clean state, discarding any uncommitted and untracked changes. Useful in case you need to revert the repo back to a clean state, e.g. after the fastlane run.",
|
33
|
+
"It's a pretty drastic action so it comes with a sort of safety latch. It will only proceed with the reset if either of these conditions are met:",
|
34
|
+
"You have called the ensure_git_status_clean action prior to calling this action. This ensures that your repo started off in a clean state, so the only things that will get destroyed by this action are files that are created as a byproduct of the fastlane run."
|
35
|
+
].join(' ')
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.available_options
|
39
|
+
[
|
40
|
+
['files', 'Array of files the changes should be discarded from. If not given, all files will be discarded'],
|
41
|
+
['force', 'Skip verifying of previously clean state of repo. Only recommended in combination with `files` option']
|
42
|
+
]
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.author
|
46
|
+
'lmirosevic'
|
47
|
+
end
|
25
48
|
end
|
26
49
|
end
|
27
50
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
3
|
# Resigns the ipa
|
4
|
-
class ResignAction
|
4
|
+
class ResignAction < Action
|
5
5
|
def self.run(params)
|
6
6
|
require 'sigh'
|
7
7
|
|
@@ -24,6 +24,22 @@ module Fastlane
|
|
24
24
|
raise 'Failed to re-sign .ipa'.red
|
25
25
|
end
|
26
26
|
end
|
27
|
+
|
28
|
+
def self.description
|
29
|
+
"Code sign an existing API"
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.available_options
|
33
|
+
[
|
34
|
+
['ipa', 'Path to the ipa file to resign. Optional if you use the `ipa` or `xcodebuild` action'],
|
35
|
+
['signing_identity', 'Code signing identity to use. e.g. "iPhone Distribution: Luka Mirosevic (0123456789)"'],
|
36
|
+
['provisioning_profile', 'Path to your provisioning_profile. Optional if you use `sigh`']
|
37
|
+
]
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.author
|
41
|
+
"lmirosevic"
|
42
|
+
end
|
27
43
|
end
|
28
44
|
end
|
29
45
|
end
|
data/lib/fastlane/actions/s3.rb
CHANGED
@@ -36,7 +36,7 @@ module Fastlane
|
|
36
36
|
path: '-P',
|
37
37
|
}
|
38
38
|
|
39
|
-
class S3Action
|
39
|
+
class S3Action < Action
|
40
40
|
def self.run(params)
|
41
41
|
|
42
42
|
params[0] ||= {}
|
@@ -241,8 +241,36 @@ module Fastlane
|
|
241
241
|
return bundle_id, bundle_version, title
|
242
242
|
end
|
243
243
|
|
244
|
-
|
244
|
+
def self.description
|
245
|
+
"Generates a plist file and uploads all to AWS S3"
|
246
|
+
end
|
247
|
+
|
248
|
+
def self.available_options
|
249
|
+
[
|
250
|
+
['access_key', 'AWS S3 Access Key', 'S3_ACCESS_KEY'],
|
251
|
+
['secret_access_key', 'AWS S3 Secret Key', 'S3_SECRET_ACCESS_KEY'],
|
252
|
+
['bucket', 'The bucket to store the ipa and plist in', 'S3_BUCKET'],
|
253
|
+
['region', 'The region of your S3 server', 'S3_REGION'],
|
254
|
+
['file', 'Path the ipa file to upload'],
|
255
|
+
['dsym', 'Path to your dsym file'],
|
256
|
+
['path', 'The path how it\'s used on S3']
|
257
|
+
# TODO: there are more options
|
258
|
+
]
|
259
|
+
end
|
245
260
|
|
261
|
+
def self.output
|
262
|
+
[
|
263
|
+
['S3_IPA_OUTPUT_PATH', 'Direct HTTP link to the uploaded ipa file'],
|
264
|
+
['S3_DSYM_OUTPUT_PATH', 'Direct HTTP link to the uploaded dsym file'],
|
265
|
+
['S3_PLIST_OUTPUT_PATH', 'Direct HTTP link to the uploaded plist file'],
|
266
|
+
['S3_HTML_OUTPUT_PATH', 'Direct HTTP link to the uploaded HTML file']
|
267
|
+
]
|
268
|
+
end
|
269
|
+
|
270
|
+
def self.author
|
271
|
+
"joshdholtz"
|
272
|
+
end
|
273
|
+
end
|
246
274
|
end
|
247
275
|
end
|
248
276
|
|
data/lib/fastlane/actions/say.rb
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
|
-
class SayAction
|
3
|
+
class SayAction < Action
|
4
4
|
def self.run(params)
|
5
5
|
text = params.join(' ')
|
6
6
|
Actions.sh("say '#{text}'")
|
7
7
|
end
|
8
|
+
|
9
|
+
def self.description
|
10
|
+
"This action speaks out loud the given text"
|
11
|
+
end
|
8
12
|
end
|
9
13
|
end
|
10
14
|
end
|
@@ -5,7 +5,7 @@ module Fastlane
|
|
5
5
|
SIGH_UDID = :SIGH_UDID
|
6
6
|
end
|
7
7
|
|
8
|
-
class SighAction
|
8
|
+
class SighAction < Action
|
9
9
|
def self.run(params)
|
10
10
|
require 'sigh'
|
11
11
|
require 'sigh/options'
|
@@ -22,12 +22,28 @@ module Fastlane
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
path = Sigh::Manager.start
|
25
|
+
begin
|
26
|
+
FastlaneCore::UpdateChecker.start_looking_for_update('sigh')
|
28
27
|
|
29
|
-
|
30
|
-
|
28
|
+
Sigh.config = FastlaneCore::Configuration.create(Sigh::Options.available_options, (values || {}))
|
29
|
+
|
30
|
+
path = Sigh::Manager.start
|
31
|
+
|
32
|
+
Actions.lane_context[SharedValues::SIGH_PROFILE_PATH] = path # absolute path
|
33
|
+
Actions.lane_context[SharedValues::SIGH_UDID] = ENV["SIGH_UDID"] if ENV["SIGH_UDID"] # The UDID of the new profile
|
34
|
+
ensure
|
35
|
+
FastlaneCore::UpdateChecker.show_update_status('sigh', Sigh::VERSION)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.description
|
40
|
+
"Generates a provisioning profile. Stores the profile in the current folder"
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.available_options
|
44
|
+
require 'sigh'
|
45
|
+
require 'sigh/options'
|
46
|
+
Sigh::Options.available_options
|
31
47
|
end
|
32
48
|
end
|
33
49
|
end
|
@@ -1,9 +1,6 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
|
-
|
4
|
-
end
|
5
|
-
|
6
|
-
class SlackAction
|
3
|
+
class SlackAction < Action
|
7
4
|
def self.git_author
|
8
5
|
s = `git log --name-status HEAD^..HEAD`
|
9
6
|
s = s.match(/Author:.*<(.*)>/)[1]
|
@@ -125,6 +122,24 @@ module Fastlane
|
|
125
122
|
Helper.log.info 'Successfully sent Slack notification'.green
|
126
123
|
end
|
127
124
|
end
|
125
|
+
|
126
|
+
def self.description
|
127
|
+
"Send a success/error message to your Slack group"
|
128
|
+
end
|
129
|
+
|
130
|
+
def self.available_options
|
131
|
+
[
|
132
|
+
['message', 'The message that should be displayed on Slack. This supports the standard Slack markup language'],
|
133
|
+
['channel', '#channel or @username'],
|
134
|
+
['success', 'Success or error?'],
|
135
|
+
['payload', 'Add additional information to this post. payload must be a hash containg any key with any value'],
|
136
|
+
['default_payloads', 'Remove some of the default payloads. More information about the available payloads GitHub']
|
137
|
+
]
|
138
|
+
end
|
139
|
+
|
140
|
+
def self.author
|
141
|
+
"KrauseFx"
|
142
|
+
end
|
128
143
|
end
|
129
144
|
end
|
130
145
|
end
|
@@ -4,7 +4,7 @@ module Fastlane
|
|
4
4
|
SNAPSHOT_SCREENSHOTS_PATH = :SNAPSHOT_SCREENSHOTS_PATH
|
5
5
|
end
|
6
6
|
|
7
|
-
class SnapshotAction
|
7
|
+
class SnapshotAction < Action
|
8
8
|
def self.run(params)
|
9
9
|
clean = true
|
10
10
|
clean = false if params.include?(:noclean)
|
@@ -17,15 +17,36 @@ module Fastlane
|
|
17
17
|
|
18
18
|
require 'snapshot'
|
19
19
|
|
20
|
-
|
21
|
-
Snapshot::SnapshotConfig.shared_instance
|
22
|
-
Snapshot::Runner.new.work(clean: clean)
|
20
|
+
FastlaneCore::UpdateChecker.start_looking_for_update('snapshot')
|
23
21
|
|
24
|
-
|
22
|
+
begin
|
23
|
+
Dir.chdir(FastlaneFolder.path) do
|
24
|
+
Snapshot::SnapshotConfig.shared_instance
|
25
|
+
Snapshot::Runner.new.work(clean: clean)
|
25
26
|
|
26
|
-
|
27
|
+
results_path = Snapshot::SnapshotConfig.shared_instance.screenshots_path
|
28
|
+
|
29
|
+
Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH] = File.expand_path(results_path) # absolute URL
|
30
|
+
end
|
31
|
+
ensure
|
32
|
+
FastlaneCore::UpdateChecker.show_update_status('snapshot', Snapshot::VERSION)
|
27
33
|
end
|
28
34
|
end
|
35
|
+
|
36
|
+
def self.description
|
37
|
+
"Generate new localised screenshots on multiple devices"
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.available_options
|
41
|
+
[
|
42
|
+
['noclean', 'Skips the clean process when building the app'],
|
43
|
+
['verbose', 'Print out the UI Automation output']
|
44
|
+
]
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.author
|
48
|
+
"KrauseFx"
|
49
|
+
end
|
29
50
|
end
|
30
51
|
end
|
31
52
|
end
|
@@ -3,7 +3,7 @@ module Fastlane
|
|
3
3
|
module SharedValues
|
4
4
|
end
|
5
5
|
|
6
|
-
class TeamIdAction
|
6
|
+
class TeamIdAction < Action
|
7
7
|
def self.run(params)
|
8
8
|
team = params.first
|
9
9
|
raise "Please pass your Team ID (e.g. team_id 'Q2CBPK58CA')".red unless team.to_s.length > 0
|
@@ -14,6 +14,14 @@ module Fastlane
|
|
14
14
|
ENV[current.to_s] = team
|
15
15
|
end
|
16
16
|
end
|
17
|
+
|
18
|
+
def self.author
|
19
|
+
"KrauseFx"
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.description
|
23
|
+
"Specify the Team ID you want to use for the Apple Developer Portal"
|
24
|
+
end
|
17
25
|
end
|
18
26
|
end
|
19
27
|
end
|
@@ -3,7 +3,7 @@ module Fastlane
|
|
3
3
|
module SharedValues
|
4
4
|
end
|
5
5
|
|
6
|
-
class TeamNameAction
|
6
|
+
class TeamNameAction < Action
|
7
7
|
def self.run(params)
|
8
8
|
team = params.first
|
9
9
|
raise "Please pass your Team Name (e.g. team_name 'Felix Krause')".red unless team.to_s.length > 0
|
@@ -14,6 +14,14 @@ module Fastlane
|
|
14
14
|
ENV[current.to_s] = team
|
15
15
|
end
|
16
16
|
end
|
17
|
+
|
18
|
+
def self.description
|
19
|
+
"Set a team to use by its name"
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.author
|
23
|
+
"KrauseFx"
|
24
|
+
end
|
17
25
|
end
|
18
26
|
end
|
19
27
|
end
|