fastlane 1.14.1 → 1.15.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13c2a6107e073776bcdc958e1c297aa184e2f429
4
- data.tar.gz: b1f4e8ebec0401aa0099f3e8ff1dcd7634c4e5cb
3
+ metadata.gz: c980a477b659d8d6117c8de3009035284dcc1e38
4
+ data.tar.gz: 2aa626bbd632c0e49094b8b3ffa79acbcf053db9
5
5
  SHA512:
6
- metadata.gz: a2d7913f3d6979b5795aefe71191b4a91ec0e5b4d305e47c156b1d7365097935b2ee1415878f571772de46dcb049f9d3ebf37a873e48148cd98fdb16c1c03106
7
- data.tar.gz: 378b0fa6da5faa20b0f1050cf892751530e8b340c59853e9476a684df1023c454b2e338c7a09246f7c1bc4eb2c74a7e9184140603cda02074cab3c5f3c95127e
6
+ metadata.gz: 7d393d36508309b50c28f18ec62ca7b542be5adb0f3d9d0f1131610f034f40d45422ee756b1921a3a63a30ffff8813f192437b389cfaa13384f82081802bea15
7
+ data.tar.gz: 20a859c58f3788fcbdb20f398bf50daf2564f4f806cc294c7d096870472fa56797aee7de4bf8d5a251b44e5c94cfee3ee3a6b23c14dd2581a4891b2cef5ccd82
@@ -8,4 +8,4 @@ apple_id "[[APPLE_ID]]" # Your Apple email address
8
8
 
9
9
 
10
10
  # you can even provide different app identifiers, Apple IDs and team names per lane:
11
- # https://github.com/KrauseFx/fastlane/blob/master/docs/Advanced.md#the-appfile
11
+ # https://github.com/KrauseFx/fastlane/blob/master/docs/Appfile.md
@@ -35,7 +35,7 @@ module Fastlane
35
35
  zip_file = File.expand_path(File.join("#{xcarchive_file}.zip"))
36
36
 
37
37
  # Create zip
38
- Actions.sh(%Q[cd #{xcarchive_folder} && zip -r -X "#{zip_file}" "#{xcarchive_file}" > /dev/null])
38
+ Actions.sh(%Q[cd "#{xcarchive_folder}" && zip -r -X "#{zip_file}" "#{xcarchive_file}" > /dev/null])
39
39
 
40
40
  # Moved to its final destination
41
41
  FileUtils.mv(zip_file, full_destination)
@@ -13,7 +13,7 @@ module Fastlane
13
13
  def self.run(params)
14
14
  require 'shenzhen'
15
15
  require 'shenzhen/plugins/crashlytics'
16
-
16
+
17
17
  # can pass groups param either as an Array or a String
18
18
  case params[:groups]
19
19
  when NilClass
@@ -24,16 +24,34 @@ module Fastlane
24
24
  groups = params[:groups]
25
25
  end
26
26
 
27
+ # Normalized notification to Crashlytics notification parameter requirement
28
+ # 'YES' or 'NO' - String
29
+ case params[:notifications]
30
+ when String
31
+ if params[:notifications] == 'YES' || params[:notifications] == 'NO'
32
+ notifications = params[:notifications]
33
+ else
34
+ notifications = 'YES' if params[:notifications] == 'true'
35
+ notifications = 'NO' if params[:notifications] == 'false'
36
+ end
37
+ when TrueClass
38
+ notifications = 'YES'
39
+ when FalseClass
40
+ notifications = 'NO'
41
+ else
42
+ notifications = nil
43
+ end
44
+
27
45
  Helper.log.info 'Uploading the IPA to Crashlytics. Go for a coffee ☕️.'.green
28
46
 
29
47
  if Helper.test?
30
48
  # Access all values, to do the verify
31
- return params[:crashlytics_path], params[:api_token], params[:build_secret], params[:ipa_path], params[:build_secret], params[:ipa_path], params[:notes_path], params[:emails], params[:groups], params[:notifications]
49
+ return params[:crashlytics_path], params[:api_token], params[:build_secret], params[:ipa_path], params[:build_secret], params[:ipa_path], params[:notes_path], params[:emails], groups, notifications
32
50
  end
33
51
 
34
52
  client = Shenzhen::Plugins::Crashlytics::Client.new(params[:crashlytics_path], params[:api_token], params[:build_secret])
35
53
 
36
- response = client.upload_build(params[:ipa_path], file: params[:ipa_path], notes: params[:notes_path], emails: params[:emails], groups: params[:groups], notifications: params[:notifications])
54
+ response = client.upload_build(params[:ipa_path], file: params[:ipa_path], notes: params[:notes_path], emails: params[:emails], groups: groups, notifications: notifications)
37
55
 
38
56
  if response
39
57
  Helper.log.info 'Build successfully uploaded to Crashlytics'.green
@@ -92,7 +110,11 @@ module Fastlane
92
110
  FastlaneCore::ConfigItem.new(key: :notifications,
93
111
  env_name: "CRASHLYTICS_NOTIFICATIONS",
94
112
  description: "Crashlytics notification option (true/false)",
95
- optional: true)
113
+ optional: true,
114
+ is_string: false,
115
+ verify_block: Proc.new do |value|
116
+ raise "Crashlytics supported notifications options: TrueClass, FalseClass, 'true', 'false', 'YES', 'NO'".red unless (value.is_a?(TrueClass) || value.is_a?(FalseClass) || value.is_a?(String))
117
+ end)
96
118
  ]
97
119
  end
98
120
 
@@ -0,0 +1,40 @@
1
+ module Fastlane
2
+ module Actions
3
+ class ImportFromGitAction < 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 from a remote git repository 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 the Fastfile",
19
+ "in a remote git repository."
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
+ ["fabiomassimo", "KrauseFx"]
33
+ end
34
+
35
+ def self.is_supported?(platform)
36
+ true
37
+ end
38
+ end
39
+ end
40
+ end
@@ -53,7 +53,7 @@ module Fastlane
53
53
  return
54
54
  end
55
55
 
56
- #suppress updater output - very noisy
56
+ # suppress updater output - very noisy
57
57
  Gem::DefaultUserInteraction.ui = Gem::SilentUI.new
58
58
 
59
59
  update_needed.each do |tool_info|
@@ -178,6 +178,43 @@ module Fastlane
178
178
  Fastlane::Actions.load_external_actions(actions_path) if File.directory?(actions_path)
179
179
  end
180
180
 
181
+ # @param url [String] The git URL to clone the repository from
182
+ # @param path [String] The path to the Fastfile
183
+ def import_from_git(url: nil, path: 'fastlane/Fastfile')
184
+ raise "Please pass a path to the `import_from_git` action".red if url.to_s.length == 0
185
+
186
+ Actions.execute_action('import_from_git') do
187
+
188
+ # Checkout the repo
189
+ repo_name = url.split("/").last
190
+
191
+ folder = File.join("/tmp", "fl_clones", repo_name)
192
+
193
+ if File.directory?folder
194
+ Helper.log.info "Using existing git repo..."
195
+ Actions.sh("git pull")
196
+ else
197
+ # When this fails, we have to clone the git repo
198
+ Helper.log.info "Cloning remote git repo..."
199
+ Actions.sh("git clone '#{url}' '#{folder}' --depth 1 -n")
200
+ end
201
+
202
+ Actions.sh("cd '#{folder}' && git checkout HEAD '#{path}'")
203
+
204
+ # We also want to check out all the local actions of this fastlane setup
205
+ containing = path.split(File::SEPARATOR)[0..-2]
206
+ containing = "." if containing.count == 0
207
+ actions_folder = File.join(containing, "actions")
208
+ begin
209
+ Actions.sh("cd '#{folder}' && git checkout HEAD '#{actions_folder}'")
210
+ rescue => ex
211
+ # We don't care about a failure here, as local actions are optional
212
+ end
213
+
214
+ import(File.join(folder, path))
215
+ end
216
+ end
217
+
181
218
  #####################################################
182
219
  # @!group Overwriting Ruby methods
183
220
  #####################################################
data/lib/fastlane/lane.rb CHANGED
@@ -16,6 +16,9 @@ module Fastlane
16
16
 
17
17
  def initialize(platform: nil, name: nil, description: nil, block: nil, is_private: false)
18
18
  raise "description must be an array" unless description.kind_of?Array
19
+ raise "lane name must not contain any spaces".red if name.to_s.include?" "
20
+ raise "lane name must start with :".red unless name.kind_of?Symbol
21
+
19
22
 
20
23
  self.platform = platform
21
24
  self.name = name
@@ -74,7 +74,8 @@ module Fastlane
74
74
 
75
75
  rows = []
76
76
  actions.each_with_index do |current, i|
77
- rows << [i + 1, current[:name], current[:time].to_i]
77
+ name = current[:name][0..60]
78
+ rows << [i + 1, name, current[:time].to_i]
78
79
  end
79
80
 
80
81
  puts ""
@@ -1,3 +1,3 @@
1
1
  module Fastlane
2
- VERSION = '1.14.1'
2
+ VERSION = '1.15.0'
3
3
  end
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.14.1
4
+ version: 1.15.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-08-03 00:00:00.000000000 Z
11
+ date: 2015-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - ">="
172
172
  - !ruby/object:Gem::Version
173
- version: 0.10.1
173
+ version: 0.12.0
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
- version: 0.10.1
180
+ version: 0.12.0
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: spaceship
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -457,6 +457,7 @@ files:
457
457
  - lib/fastlane/actions/hockey.rb
458
458
  - lib/fastlane/actions/import.rb
459
459
  - lib/fastlane/actions/import_certificate.rb
460
+ - lib/fastlane/actions/import_from_git.rb
460
461
  - lib/fastlane/actions/increment_build_number.rb
461
462
  - lib/fastlane/actions/increment_version_number.rb
462
463
  - lib/fastlane/actions/install_carthage.rb