fastlane 1.11.0 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -2
- data/bin/fastlane +1 -1
- data/lib/assets/FastfileTemplate +0 -1
- data/lib/fastlane/actions/import.rb +40 -0
- data/lib/fastlane/actions/last_git_tag.rb +33 -0
- data/lib/fastlane/actions/set_changelog.rb +111 -0
- data/lib/fastlane/actions_list.rb +2 -1
- data/lib/fastlane/fast_file.rb +27 -3
- data/lib/fastlane/lane_manager.rb +19 -0
- data/lib/fastlane/runner.rb +5 -3
- data/lib/fastlane/version.rb +1 -1
- metadata +19 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5f529c6a9b0a19c72f3d9c5f3850a45055042fb
|
4
|
+
data.tar.gz: 40946f6c7fcc33a79d6dae5d6a4d2d9b938610d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a1e3d077cb8c2578cc5352bb0dc2d511667b579ac802a9ef104dc1a052eb545da0e184dbac577ba94f561b5cfc2cfb66fec2ee4022d53e185161dbb2ace864b
|
7
|
+
data.tar.gz: 9eac730dd0cefab3e63ef0c5471f986684c7ab96a8927ecd1096258dd89f22de9b972af88709ac332b59321eb7fcc4257ed1ce1d87c74d00c723979dd762f983
|
data/README.md
CHANGED
@@ -9,7 +9,10 @@
|
|
9
9
|
<a href="https://github.com/KrauseFx/sigh">sigh</a> •
|
10
10
|
<a href="https://github.com/KrauseFx/produce">produce</a> •
|
11
11
|
<a href="https://github.com/KrauseFx/cert">cert</a> •
|
12
|
-
<a href="https://github.com/KrauseFx/codes">codes</a>
|
12
|
+
<a href="https://github.com/KrauseFx/codes">codes</a> •
|
13
|
+
<a href="https://github.com/fastlane/spaceship">spaceship</a> •
|
14
|
+
<a href="https://github.com/fastlane/pilot">pilot</a> •
|
15
|
+
<a href="https://github.com/fastlane/boarding">boarding</a>
|
13
16
|
</p>
|
14
17
|
-------
|
15
18
|
|
@@ -31,6 +34,7 @@ Get in contact with the developer on Twitter: [@KrauseFx](https://twitter.com/Kr
|
|
31
34
|
<a href="#installation">Installation</a> •
|
32
35
|
<a href="#quick-start">Quick Start</a> •
|
33
36
|
<a href="#examples">Example Setups</a> •
|
37
|
+
<a href="https://github.com/KrauseFx/fastlane/tree/master/docs">Documentation</a> •
|
34
38
|
<a href="#need-help">Need help?</a>
|
35
39
|
</p>
|
36
40
|
|
@@ -141,7 +145,7 @@ See how [Wikipedia](https://github.com/fastlane/examples#wikipedia-by-wikimedia-
|
|
141
145
|
|
142
146
|
`fastlane` is designed to make your life easier by bringing together the `fastlane` suite of tools under one roof.
|
143
147
|
|
144
|
-
- [`deliver`](https://github.com/KrauseFx/deliver): Upload screenshots, metadata and your app to the App Store
|
148
|
+
- [`deliver`](https://github.com/KrauseFx/deliver): Upload screenshots, metadata and your app to the App Store
|
145
149
|
- [`snapshot`](https://github.com/KrauseFx/snapshot): Automate taking localized screenshots of your iOS app on every device
|
146
150
|
- [`frameit`](https://github.com/KrauseFx/frameit): Quickly put your screenshots into the right device frames
|
147
151
|
- [`PEM`](https://github.com/KrauseFx/pem): Automatically generate and renew your push notification profiles
|
@@ -149,6 +153,9 @@ See how [Wikipedia](https://github.com/fastlane/examples#wikipedia-by-wikimedia-
|
|
149
153
|
- [`produce`](https://github.com/KrauseFx/produce): Create new iOS apps on iTunes Connect and Dev Portal using the command line
|
150
154
|
- [`cert`](https://github.com/KrauseFx/cert): Automatically create and maintain iOS code signing certificates
|
151
155
|
- [`codes`](https://github.com/KrauseFx/codes): Create promo codes for iOS Apps using the command line
|
156
|
+
- [`spaceship`](https://github.com/fastlane/spaceship): Ruby library to access the Apple Dev Center and iTunes Connect
|
157
|
+
- [`pilot`](https://github.com/fastlane/pilot): The best way to manage your TestFlight testers and builds from your terminal
|
158
|
+
- [`boarding`](https://github.com/fastlane/boarding): The easiest way to invite your TestFlight beta testers
|
152
159
|
|
153
160
|
## Statistics
|
154
161
|
|
@@ -184,3 +191,5 @@ Check out the project pages of the other tools for more sponsors and contributor
|
|
184
191
|
|
185
192
|
## License
|
186
193
|
This project is licensed under the terms of the MIT license. See the LICENSE file.
|
194
|
+
|
195
|
+
> This project and all fastlane tools are in no way affiliated with Apple Inc. This project is open source under the MIT license, which means you have full access to the source code and can modify it to fit your own needs. All fastlane tools run on your own computer or server, so your credentials or other sensitive information will never leave your own computer. You are responsible for how you use fastlane tools.
|
data/bin/fastlane
CHANGED
@@ -76,7 +76,7 @@ class FastlaneApplication
|
|
76
76
|
ff = Fastlane::FastFile.new(File.join(Fastlane::FastlaneFolder.path || '.', 'Fastfile'))
|
77
77
|
puts "\nAvailable lanes:".green
|
78
78
|
ff.runner.available_lanes.each do |lane|
|
79
|
-
puts "- #{lane}"
|
79
|
+
puts "- #{lane}"
|
80
80
|
end
|
81
81
|
puts "\nExecute using `fastlane [lane_name]`".yellow
|
82
82
|
end
|
data/lib/assets/FastfileTemplate
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class ImportAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
# this is implemented in the fast_file.rb
|
6
|
+
end
|
7
|
+
|
8
|
+
#####################################################
|
9
|
+
# @!group Documentation
|
10
|
+
#####################################################
|
11
|
+
|
12
|
+
def self.description
|
13
|
+
"Import another Fastfile to use its lanes"
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.details
|
17
|
+
[
|
18
|
+
"This is useful if you have shared lanes across multiple apps and you want to store a Fastfile",
|
19
|
+
"in a separate folder. The path must be relative to the Fastfile this is called from."
|
20
|
+
].join("\n")
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.available_options
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.output
|
28
|
+
[]
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.authors
|
32
|
+
["KrauseFx"]
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.is_supported?(platform)
|
36
|
+
true
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class LastGitTagAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
sh "git describe --tags --abbrev=0"
|
6
|
+
end
|
7
|
+
|
8
|
+
#####################################################
|
9
|
+
# @!group Documentation
|
10
|
+
#####################################################
|
11
|
+
|
12
|
+
def self.description
|
13
|
+
"Get the most recent git tag"
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.available_options
|
17
|
+
[]
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.output
|
21
|
+
[]
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.authors
|
25
|
+
["KrauseFx"]
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.is_supported?(platform)
|
29
|
+
true
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,111 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class SetChangelogAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
require 'spaceship'
|
6
|
+
|
7
|
+
Spaceship::Tunes.login(params[:username])
|
8
|
+
app = Spaceship::Application.find(params[:app_identifier])
|
9
|
+
|
10
|
+
version_number = params[:version]
|
11
|
+
unless version_number
|
12
|
+
# Automatically fetch the latest version
|
13
|
+
Helper.log.info "Fetching the latest version for this app"
|
14
|
+
if app.edit_version and app.edit_version.version
|
15
|
+
version_number = app.edit_version.version
|
16
|
+
else
|
17
|
+
Helper.log.info "You have to specify a new version number: "
|
18
|
+
version_number = STDIN.gets.strip
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
Helper.log.info "Going to update version #{version_number}"
|
23
|
+
|
24
|
+
changelog = params[:changelog]
|
25
|
+
unless changelog
|
26
|
+
path = "./fastlane/changelog.txt"
|
27
|
+
Helper.log.info "Looking for changelog in '#{path}'..."
|
28
|
+
if File.exists?path
|
29
|
+
changelog = File.read(path)
|
30
|
+
else
|
31
|
+
Helper.log.error "Couldn't find changelog.txt"
|
32
|
+
Helper.log.info "Please enter the changelog here:"
|
33
|
+
changelog = STDIN.gets
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
Helper.log.info "Going to update the changelog to:\n\n#{changelog}\n\n"
|
38
|
+
|
39
|
+
if (v = app.edit_version)
|
40
|
+
if v.version != version_number
|
41
|
+
# Version is already there, make sure it matches the one we want to create
|
42
|
+
Helper.log.info "Changing existing version number from '#{v.version}' to '#{version_number}'"
|
43
|
+
v.version = version_number
|
44
|
+
v.save!
|
45
|
+
else
|
46
|
+
Helper.log.info "Updating changelog for existing version #{v.version}"
|
47
|
+
end
|
48
|
+
else
|
49
|
+
Helper.log.info "Creating the new version: #{version_number}"
|
50
|
+
app.create_version!(version_number)
|
51
|
+
app = Spaceship::Application.find(params[:app_identifier]) # TODO: replace with .reload method once available
|
52
|
+
v = app.edit_version
|
53
|
+
end
|
54
|
+
|
55
|
+
v.release_notes.languages.each do |lang|
|
56
|
+
v.release_notes[lang] = changelog
|
57
|
+
end
|
58
|
+
Helper.log.info "Uploading changes to iTunes Connect..."
|
59
|
+
v.save!
|
60
|
+
|
61
|
+
Helper.log.info "👼 Successfully pushed the new changelog to #{v.url}".green
|
62
|
+
end
|
63
|
+
|
64
|
+
#####################################################
|
65
|
+
# @!group Documentation
|
66
|
+
#####################################################
|
67
|
+
|
68
|
+
def self.description
|
69
|
+
"Set the changelog for all languages on iTunes Connect"
|
70
|
+
end
|
71
|
+
|
72
|
+
def self.details
|
73
|
+
"This is useful if you have only one changelog for all languages"
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.available_options
|
77
|
+
[
|
78
|
+
FastlaneCore::ConfigItem.new(key: :app_identifier,
|
79
|
+
short_option: "-a",
|
80
|
+
env_name: "FASTLANE_APP_IDENTIFIER",
|
81
|
+
description: "The bundle identifier of your app",
|
82
|
+
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)),
|
83
|
+
FastlaneCore::ConfigItem.new(key: :username,
|
84
|
+
short_option: "-u",
|
85
|
+
env_name: "FASTLANE_USERNAME",
|
86
|
+
description: "Your Apple ID Username",
|
87
|
+
default_value: ENV["DELIVER_USER"] || CredentialsManager::AppfileConfig.try_fetch_value(:apple_id),
|
88
|
+
verify_block: Proc.new do |value|
|
89
|
+
CredentialsManager::PasswordManager.shared_manager(value)
|
90
|
+
end),
|
91
|
+
FastlaneCore::ConfigItem.new(key: :version,
|
92
|
+
env_name: "FL_SET_CHANGELOG_VERSION",
|
93
|
+
description: "The version number to create/update",
|
94
|
+
optional: true),
|
95
|
+
FastlaneCore::ConfigItem.new(key: :changelog,
|
96
|
+
env_name: "FL_SET_CHANGELOG_CHANGELOG",
|
97
|
+
description: "Changelog text that should be uploaded to iTunes Connect",
|
98
|
+
optional: true)
|
99
|
+
]
|
100
|
+
end
|
101
|
+
|
102
|
+
def self.authors
|
103
|
+
["KrauseFx"]
|
104
|
+
end
|
105
|
+
|
106
|
+
def self.is_supported?(platform)
|
107
|
+
[:ios, :mac].include?platform
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
@@ -16,7 +16,8 @@ module Fastlane
|
|
16
16
|
current << action.description if action.description
|
17
17
|
|
18
18
|
authors = Array(action.author || action.authors)
|
19
|
-
current << authors.
|
19
|
+
current << authors.first.green if authors.count == 1
|
20
|
+
current << "Multiple".green if authors.count > 1
|
20
21
|
|
21
22
|
l = (action.description || '').length
|
22
23
|
else
|
data/lib/fastlane/fast_file.rb
CHANGED
@@ -13,14 +13,14 @@ module Fastlane
|
|
13
13
|
def initialize(path = nil)
|
14
14
|
return unless (path || '').length > 0
|
15
15
|
raise "Could not find Fastfile at path '#{path}'".red unless File.exist?(path)
|
16
|
-
@path = path
|
16
|
+
@path = File.expand_path(path)
|
17
17
|
content = File.read(path)
|
18
18
|
|
19
19
|
parse(content)
|
20
20
|
end
|
21
21
|
|
22
22
|
def parse(data)
|
23
|
-
@runner
|
23
|
+
@runner ||= Runner.new
|
24
24
|
|
25
25
|
Dir.chdir(Fastlane::FastlaneFolder.path || Dir.pwd) do # context: fastlane subfolder
|
26
26
|
eval(data) # this is okay in this case
|
@@ -34,7 +34,6 @@ module Fastlane
|
|
34
34
|
# @!group DSL
|
35
35
|
#####################################################
|
36
36
|
|
37
|
-
|
38
37
|
# User defines a new lane
|
39
38
|
def lane(lane_name, &block)
|
40
39
|
raise "You have to pass a block using 'do' for lane '#{lane_name}'. Make sure you read the docs on GitHub.".red unless block
|
@@ -60,6 +59,19 @@ module Fastlane
|
|
60
59
|
|
61
60
|
@desc_collection = nil # reset the collected description again for the next lane
|
62
61
|
end
|
62
|
+
|
63
|
+
# User defines a lane that can overwrite existing lanes. Useful when importing a Fastfile
|
64
|
+
def override_lane(lane_name, &block)
|
65
|
+
raise "You have to pass a block using 'do' for lane '#{lane_name}'. Make sure you read the docs on GitHub.".red unless block
|
66
|
+
|
67
|
+
self.runner.add_lane(Lane.new(platform: self.current_platform,
|
68
|
+
block: block,
|
69
|
+
description: desc_collection,
|
70
|
+
name: lane_name,
|
71
|
+
is_private: false), true)
|
72
|
+
|
73
|
+
@desc_collection = nil # reset the collected description again for the next lane
|
74
|
+
end
|
63
75
|
|
64
76
|
# User defines a platform block
|
65
77
|
def platform(platform_name, &block)
|
@@ -150,6 +162,18 @@ module Fastlane
|
|
150
162
|
@desc_collection ||= []
|
151
163
|
end
|
152
164
|
|
165
|
+
def import(path = nil)
|
166
|
+
raise "Please pass a path to the `import` action".red unless path
|
167
|
+
|
168
|
+
unless Pathname.new(path).absolute? # unless an absolute path
|
169
|
+
path = File.join(File.expand_path('..', @path), path)
|
170
|
+
end
|
171
|
+
|
172
|
+
raise "Could not find Fastfile at path '#{path}'".red unless File.exists?(path)
|
173
|
+
|
174
|
+
parse(File.read(path))
|
175
|
+
end
|
176
|
+
|
153
177
|
#####################################################
|
154
178
|
# @!group Overwriting Ruby methods
|
155
179
|
#####################################################
|
@@ -54,6 +54,7 @@ module Fastlane
|
|
54
54
|
|
55
55
|
# Finished with all the lanes
|
56
56
|
Fastlane::JUnitGenerator.generate(Fastlane::Actions.executed_actions)
|
57
|
+
print_table(Fastlane::Actions.executed_actions)
|
57
58
|
|
58
59
|
unless error
|
59
60
|
if duration > 5
|
@@ -67,6 +68,24 @@ module Fastlane
|
|
67
68
|
end
|
68
69
|
end
|
69
70
|
|
71
|
+
# Print a table as summary of the executed actions
|
72
|
+
def self.print_table(actions)
|
73
|
+
require 'terminal-table'
|
74
|
+
|
75
|
+
rows = []
|
76
|
+
actions.each_with_index do |current, i|
|
77
|
+
rows << [i + 1, current[:name], current[:time].to_i]
|
78
|
+
end
|
79
|
+
|
80
|
+
puts ""
|
81
|
+
puts Terminal::Table.new(
|
82
|
+
title: "fastlane summary".green,
|
83
|
+
headings: ["Step", "Action", "Time (in s)"],
|
84
|
+
rows: rows
|
85
|
+
)
|
86
|
+
puts ""
|
87
|
+
end
|
88
|
+
|
70
89
|
# Lane chooser if user didn't provide a lane
|
71
90
|
# @param platform: is probably nil, but user might have called `fastlane android`, and only wants to list those actions
|
72
91
|
def self.choose_lane(ff, platform)
|
data/lib/fastlane/runner.rb
CHANGED
@@ -76,7 +76,7 @@ module Fastlane
|
|
76
76
|
next if (filter_platform and filter_platform.to_s != platform.to_s) # skip actions that don't match
|
77
77
|
|
78
78
|
platform_lanes.each do |lane_name, lane|
|
79
|
-
all << [platform, lane_name].reject(&:nil?).join(' ')
|
79
|
+
all << [platform, lane_name].reject(&:nil?).join(' ') unless lane.is_private
|
80
80
|
end
|
81
81
|
end
|
82
82
|
all
|
@@ -174,10 +174,12 @@ module Fastlane
|
|
174
174
|
#
|
175
175
|
|
176
176
|
# @param lane [Lane] A lane object
|
177
|
-
def add_lane(lane)
|
177
|
+
def add_lane(lane, override = false)
|
178
178
|
lanes[lane.platform] ||= {}
|
179
179
|
|
180
|
-
|
180
|
+
if !override and lanes[lane.platform][lane.name]
|
181
|
+
raise "Lane '#{lane.name}' was defined multiple times!".red
|
182
|
+
end
|
181
183
|
|
182
184
|
lanes[lane.platform][lane.name] = lane
|
183
185
|
end
|
data/lib/fastlane/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -178,6 +178,20 @@ dependencies:
|
|
178
178
|
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: 0.10.1
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: spaceship
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: 0.2.0
|
188
|
+
type: :runtime
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: 0.2.0
|
181
195
|
- !ruby/object:Gem::Dependency
|
182
196
|
name: deliver
|
183
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -439,6 +453,7 @@ files:
|
|
439
453
|
- lib/fastlane/actions/hg_push.rb
|
440
454
|
- lib/fastlane/actions/hipchat.rb
|
441
455
|
- lib/fastlane/actions/hockey.rb
|
456
|
+
- lib/fastlane/actions/import.rb
|
442
457
|
- lib/fastlane/actions/import_certificate.rb
|
443
458
|
- lib/fastlane/actions/increment_build_number.rb
|
444
459
|
- lib/fastlane/actions/increment_version_number.rb
|
@@ -446,6 +461,7 @@ files:
|
|
446
461
|
- lib/fastlane/actions/install_cocapods.rb
|
447
462
|
- lib/fastlane/actions/ipa.rb
|
448
463
|
- lib/fastlane/actions/lane_context.rb
|
464
|
+
- lib/fastlane/actions/last_git_tag.rb
|
449
465
|
- lib/fastlane/actions/lcov.rb
|
450
466
|
- lib/fastlane/actions/mailgun.rb
|
451
467
|
- lib/fastlane/actions/notify.rb
|
@@ -463,6 +479,7 @@ files:
|
|
463
479
|
- lib/fastlane/actions/s3.rb
|
464
480
|
- lib/fastlane/actions/say.rb
|
465
481
|
- lib/fastlane/actions/set_build_number_repository.rb
|
482
|
+
- lib/fastlane/actions/set_changelog.rb
|
466
483
|
- lib/fastlane/actions/sigh.rb
|
467
484
|
- lib/fastlane/actions/slack.rb
|
468
485
|
- lib/fastlane/actions/snapshot.rb
|