fastlane 0.8.1 → 0.9.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 +14 -0
- data/bin/fastlane +18 -0
- data/lib/assets/FastfileTemplate +7 -0
- data/lib/fastlane/actions/deliver.rb +1 -0
- data/lib/fastlane/actions/increment_build_number.rb +3 -0
- data/lib/fastlane/actions/ipa.rb +17 -19
- data/lib/fastlane/actions/slack.rb +11 -1
- data/lib/fastlane/docs_generator.rb +19 -0
- data/lib/fastlane/fast_file.rb +11 -1
- data/lib/fastlane/runner.rb +9 -3
- data/lib/fastlane/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ff79546ed862f892ac91759a464aeac53b73a43
|
4
|
+
data.tar.gz: 4bace796f713dc757e98bd5714307d63e93275ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0999de10e1695a008598338aff6226ca942ae5571cbf111d034bf804a4898c8533c77581fbac4b5c1e223b242591984429a7f4262a75d80f182b0ba2fe8ad62
|
7
|
+
data.tar.gz: 114466acfb84ca09bca715e5982fd9147c73e50d5e65cd2d2bf69fe46194d09126c2a11d78eb6a44ec887f4e7611f0d3c22432da776ef4a96e7f15ed85168a5b
|
data/README.md
CHANGED
@@ -114,6 +114,20 @@ The setup assistant will create all the necessary files for you, using the exist
|
|
114
114
|
|
115
115
|
For more details, please follow the [fastlane guide](https://github.com/KrauseFx/fastlane/blob/master/docs/Guide.md) or [documentation](https://github.com/KrauseFx/fastlane/blob/master/docs).
|
116
116
|
|
117
|
+
## Available commands
|
118
|
+
|
119
|
+
Usually you'll use fastlane by triggering individual lanes:
|
120
|
+
|
121
|
+
fastlane [lane_name]
|
122
|
+
|
123
|
+
#### Other commands
|
124
|
+
|
125
|
+
- `fastlane lanes`: Lists all available lanes
|
126
|
+
- `fastlane docs`: Generates a markdown based documentation of all your lanes
|
127
|
+
- `fastlane actions`: List all available `fastlane` actions
|
128
|
+
- `fastlane action [action_name]`: Shows a more detailed description of an action with its available parameters
|
129
|
+
- `fastlane new_action`: Create a new action (integration) for fastlane
|
130
|
+
|
117
131
|
## [`fastlane`](https://fastlane.tools) Toolchain
|
118
132
|
|
119
133
|
`fastlane` is designed to make your life easier by bringing together the `fastlane` suite of tools under one roof.
|
data/bin/fastlane
CHANGED
@@ -69,6 +69,24 @@ class FastlaneApplication
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
+
command :docs do |c|
|
73
|
+
c.syntax = 'fastlane docs'
|
74
|
+
c.description = 'Generate a markdown based documentation based on the Fastfile'
|
75
|
+
c.option '-f', '--force', 'Overwrite the existing README.md in the ./fastlane folder'
|
76
|
+
|
77
|
+
c.action do |_args, _options|
|
78
|
+
path = File.join(Fastlane::FastlaneFolder.path, 'README.md')
|
79
|
+
if File.exists?path and not _options.force
|
80
|
+
return unless agree('Found existing ./fastlane/README.md. Do you want to overwrite it? (y/n)', true)
|
81
|
+
end
|
82
|
+
|
83
|
+
ff = Fastlane::FastFile.new(File.join(Fastlane::FastlaneFolder.path, 'Fastfile'))
|
84
|
+
|
85
|
+
require 'fastlane/docs_generator'
|
86
|
+
Fastlane::DocsGenerator.run(path, ff)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
72
90
|
command :actions do |c|
|
73
91
|
c.syntax = 'fastlane actions'
|
74
92
|
c.description = 'Lists all available fastlane actions'
|
data/lib/assets/FastfileTemplate
CHANGED
@@ -27,17 +27,23 @@ before_all do
|
|
27
27
|
xctool
|
28
28
|
end
|
29
29
|
|
30
|
+
desc "Runs all the tests"
|
30
31
|
lane :test do
|
31
32
|
snapshot
|
32
33
|
end
|
33
34
|
|
35
|
+
desc "Submit a new Beta Build to Apple TestFlight"
|
36
|
+
desc "This will also make sure the profile is up to date"
|
34
37
|
lane :beta do
|
35
38
|
snapshot
|
36
39
|
sigh
|
37
40
|
deliver :skip_deploy, :beta
|
38
41
|
# sh "your_script.sh"
|
42
|
+
# You can use other beta testing services here
|
39
43
|
end
|
40
44
|
|
45
|
+
desc "Deploy a new version to the App Store"
|
46
|
+
desc "** Full Markdown** Support: `code`"
|
41
47
|
lane :deploy do
|
42
48
|
snapshot
|
43
49
|
sigh
|
@@ -45,6 +51,7 @@ lane :deploy do
|
|
45
51
|
# frameit
|
46
52
|
end
|
47
53
|
|
54
|
+
desc "In House Beta Enterprise Distribution"
|
48
55
|
lane :inhouse do
|
49
56
|
# insert your code here
|
50
57
|
end
|
@@ -41,6 +41,7 @@ module Fastlane
|
|
41
41
|
['force', 'Set to true to skip PDF verification'],
|
42
42
|
['beta', 'Upload a new version to TestFlight'],
|
43
43
|
['skip_deploy', 'Skip the submission of the app - it will only be uploaded'],
|
44
|
+
['', 'Specify a path to the directory containing the Deliverfile', 'DELIVERFILE_PATH']
|
44
45
|
]
|
45
46
|
end
|
46
47
|
|
@@ -22,6 +22,9 @@ module Fastlane
|
|
22
22
|
when Fixnum
|
23
23
|
custom_number = first_param
|
24
24
|
folder = '.'
|
25
|
+
when String
|
26
|
+
custom_number = first_param
|
27
|
+
folder = '.'
|
25
28
|
when Hash
|
26
29
|
custom_number = first_param[:build_number]
|
27
30
|
folder = first_param[:xcodeproj] ? File.join('.', first_param[:xcodeproj], '..') : '.'
|
data/lib/fastlane/actions/ipa.rb
CHANGED
@@ -31,7 +31,6 @@ module Fastlane
|
|
31
31
|
identity: '-i',
|
32
32
|
sdk: '--sdk',
|
33
33
|
ipa: '--ipa',
|
34
|
-
verbose: '--verbose',
|
35
34
|
xcargs: '--xcargs',
|
36
35
|
}
|
37
36
|
|
@@ -72,7 +71,7 @@ module Fastlane
|
|
72
71
|
# Joins args into space delimited string
|
73
72
|
build_args = build_args.join(' ')
|
74
73
|
|
75
|
-
command = "ipa build #{build_args}"
|
74
|
+
command = "set -o pipefail && ipa build #{build_args} --verbose | xcpretty"
|
76
75
|
Helper.log.debug command
|
77
76
|
Actions.sh command
|
78
77
|
|
@@ -88,8 +87,8 @@ module Fastlane
|
|
88
87
|
end
|
89
88
|
|
90
89
|
def self.params_to_build_args(params)
|
91
|
-
# Remove nil value params unless :clean or :archive
|
92
|
-
params = params.delete_if { |k, v| (k != :clean && k != :archive
|
90
|
+
# Remove nil value params unless :clean or :archive
|
91
|
+
params = params.delete_if { |k, v| (k != :clean && k != :archive) && v.nil? }
|
93
92
|
|
94
93
|
params = fill_in_default_values(params)
|
95
94
|
|
@@ -134,21 +133,20 @@ module Fastlane
|
|
134
133
|
end
|
135
134
|
|
136
135
|
def self.available_options
|
137
|
-
[
|
138
|
-
['workspace', 'Workspace (.xcworkspace) file to use to build app (automatically detected in current directory)'],
|
139
|
-
['project', 'Project (.xcodeproj) file to use to build app (automatically detected in current directory'],
|
140
|
-
['configuration', 'Configuration used to build'],
|
141
|
-
['scheme', 'Scheme used to build app'],
|
142
|
-
['clean', 'use an extra XCCONFIG file to build the app'],
|
143
|
-
['archive', 'pass additional arguments to xcodebuild when building the app. Be sure to quote multiple args.'],
|
144
|
-
['destination', 'Clean project before building'],
|
145
|
-
['embed', 'Archive project after building'],
|
146
|
-
['identity', 'Destination. Defaults to current directory'],
|
147
|
-
['sdk', 'Sign .ipa file with .mobileprovision'],
|
148
|
-
['ipa', 'Identity to be used along with --embed'],
|
149
|
-
['
|
150
|
-
|
151
|
-
]
|
136
|
+
# [
|
137
|
+
# ['workspace', 'Workspace (.xcworkspace) file to use to build app (automatically detected in current directory)'],
|
138
|
+
# ['project', 'Project (.xcodeproj) file to use to build app (automatically detected in current directory'],
|
139
|
+
# ['configuration', 'Configuration used to build'],
|
140
|
+
# ['scheme', 'Scheme used to build app'],
|
141
|
+
# ['clean', 'use an extra XCCONFIG file to build the app'],
|
142
|
+
# ['archive', 'pass additional arguments to xcodebuild when building the app. Be sure to quote multiple args.'],
|
143
|
+
# ['destination', 'Clean project before building'],
|
144
|
+
# ['embed', 'Archive project after building'],
|
145
|
+
# ['identity', 'Destination. Defaults to current directory'],
|
146
|
+
# ['sdk', 'Sign .ipa file with .mobileprovision'],
|
147
|
+
# ['ipa', 'Identity to be used along with --embed'],
|
148
|
+
# ['xcargs', 'specify the name of the .ipa file to generate (including file extension)']
|
149
|
+
# ]
|
152
150
|
end
|
153
151
|
|
154
152
|
def self.output
|
@@ -16,6 +16,16 @@ module Fastlane
|
|
16
16
|
nil
|
17
17
|
end
|
18
18
|
|
19
|
+
# As there is a text limit in the notifications, we are
|
20
|
+
# usually interested in the last part of the message
|
21
|
+
# e.g. for tests
|
22
|
+
def self.trim_message(message)
|
23
|
+
# We want the last 7000 characters, instead of the first 7000, as the error is at the bottom
|
24
|
+
start_index = [message.length - 7000, 0].max
|
25
|
+
message = message[start_index..-1]
|
26
|
+
message
|
27
|
+
end
|
28
|
+
|
19
29
|
def self.run(params)
|
20
30
|
options = { message: '',
|
21
31
|
success: true,
|
@@ -26,7 +36,7 @@ module Fastlane
|
|
26
36
|
require 'slack-notifier'
|
27
37
|
|
28
38
|
color = (options[:success] ? 'good' : 'danger')
|
29
|
-
options[:message] = options[:message].to_s
|
39
|
+
options[:message] = self.trim_message(options[:message].to_s || '')
|
30
40
|
|
31
41
|
options[:message] = Slack::Notifier::LinkFormatter.format(options[:message])
|
32
42
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Fastlane
|
2
|
+
class DocsGenerator
|
3
|
+
def self.run(output_path, ff)
|
4
|
+
output = "fastlane actions\n"
|
5
|
+
output += "================\n"
|
6
|
+
|
7
|
+
ff.runner.description_blocks.each do |lane, description|
|
8
|
+
output += "## #{lane}\n\n"
|
9
|
+
output += "```\n"
|
10
|
+
output += "fastlane #{lane}\n"
|
11
|
+
output += "```\n\n"
|
12
|
+
output += description + "\n"
|
13
|
+
end
|
14
|
+
|
15
|
+
File.write(output_path, output)
|
16
|
+
Helper.log.info "Successfully generated documentation to path '#{File.expand_path(output_path)}'".green
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/fastlane/fast_file.rb
CHANGED
@@ -16,6 +16,10 @@ module Fastlane
|
|
16
16
|
@collector ||= ActionCollector.new
|
17
17
|
end
|
18
18
|
|
19
|
+
def desc_collection
|
20
|
+
@desc_collection ||= []
|
21
|
+
end
|
22
|
+
|
19
23
|
def parse(data)
|
20
24
|
@runner = Runner.new
|
21
25
|
|
@@ -27,7 +31,9 @@ module Fastlane
|
|
27
31
|
end
|
28
32
|
|
29
33
|
def lane(key, &block)
|
30
|
-
|
34
|
+
desc = desc_collection.join("\n\n")
|
35
|
+
@runner.set_block(key, block, desc)
|
36
|
+
@desc_collection = nil # reset again
|
31
37
|
end
|
32
38
|
|
33
39
|
def before_all(&block)
|
@@ -69,6 +75,10 @@ module Fastlane
|
|
69
75
|
collector.did_finish
|
70
76
|
end
|
71
77
|
|
78
|
+
def desc(string)
|
79
|
+
desc_collection << string
|
80
|
+
end
|
81
|
+
|
72
82
|
def method_missing(method_sym, *arguments, &_block)
|
73
83
|
# First, check if there is a predefined method in the actions folder
|
74
84
|
|
data/lib/fastlane/runner.rb
CHANGED
@@ -51,15 +51,21 @@ module Fastlane
|
|
51
51
|
@error = block
|
52
52
|
end
|
53
53
|
|
54
|
-
|
54
|
+
# @param key: The name of the lane
|
55
|
+
# @param block: The block of the lane
|
56
|
+
# @param desc: Description of this action
|
57
|
+
def set_block(key, block, desc = nil)
|
55
58
|
raise "Lane '#{key}' was defined multiple times!".red if blocks[key]
|
56
59
|
blocks[key] = block
|
60
|
+
description_blocks[key] = desc
|
57
61
|
end
|
58
62
|
|
59
|
-
private
|
60
|
-
|
61
63
|
def blocks
|
62
64
|
@blocks ||= {}
|
63
65
|
end
|
66
|
+
|
67
|
+
def description_blocks
|
68
|
+
@description_blocks ||= {}
|
69
|
+
end
|
64
70
|
end
|
65
71
|
end
|
data/lib/fastlane/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
@@ -218,14 +218,14 @@ dependencies:
|
|
218
218
|
requirements:
|
219
219
|
- - '>='
|
220
220
|
- !ruby/object:Gem::Version
|
221
|
-
version: 0.4.
|
221
|
+
version: 0.4.9
|
222
222
|
type: :runtime
|
223
223
|
prerelease: false
|
224
224
|
version_requirements: !ruby/object:Gem::Requirement
|
225
225
|
requirements:
|
226
226
|
- - '>='
|
227
227
|
- !ruby/object:Gem::Version
|
228
|
-
version: 0.4.
|
228
|
+
version: 0.4.9
|
229
229
|
- !ruby/object:Gem::Dependency
|
230
230
|
name: produce
|
231
231
|
requirement: !ruby/object:Gem::Requirement
|
@@ -428,6 +428,7 @@ files:
|
|
428
428
|
- lib/fastlane/actions_list.rb
|
429
429
|
- lib/fastlane/core_ext/string.rb
|
430
430
|
- lib/fastlane/dependency_checker.rb
|
431
|
+
- lib/fastlane/docs_generator.rb
|
431
432
|
- lib/fastlane/fast_file.rb
|
432
433
|
- lib/fastlane/fastlane_folder.rb
|
433
434
|
- lib/fastlane/junit_generator.rb
|