fastlane 1.86.1 → 1.87.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c36464d6cc1f31bcc0d5a3d012a7614e7b6ac1a
4
- data.tar.gz: a2a4331e9aaa4d5765b894b580761a7dc4581297
3
+ metadata.gz: a5d72bde2814ab63746e584edd4778f24f155374
4
+ data.tar.gz: 32e8447fd23c2d17be8661d2ef014d96467f9ae3
5
5
  SHA512:
6
- metadata.gz: 6943e3b76bf3f23163e7724fa1770ad1fa76760f7407364871974314a9d57b9514954282a3fb8cfda9ad41ed2b19c47487f05bccd40726291a2dc44b452a71fe
7
- data.tar.gz: 64fd2730fa04157b1d8c9ccdc34d9d07496b9cb7fb427b2bd7416f6c8e3e458cc2a0f8b9591d2a6a69fc71072ac1e879c3f93d8f82ce773d105ceb3ddb0ae426
6
+ metadata.gz: 05ebe99710027c088db55eb78c211ec65ebded3bc4866946855584d60ad6c5fb1e47d7088caaae3bc5c2e052bf6edfba0ff1dd72c272ab32629534e90e9d6cfb
7
+ data.tar.gz: 40b65c9bcbce9d7396d32aaf758e071f35dcc8c099310dc035899c2aef3d679370bef641dbb2b3edc88fa257d1793d5727cdbc5c04488e3ab5401b7b5a5652dc
@@ -14,10 +14,10 @@ module Fastlane
14
14
  app_path = Dir[File.join(tmp_path, "**", "*.app")].last
15
15
  UI.user_error!("Couldn't find app") unless app_path
16
16
 
17
- zipped_ipa = Actions::ZipAction.run(path: app_path,
18
- output_path: File.join(tmp_path, "Result.zip"))
17
+ zipped_bundle = Actions::ZipAction.run(path: app_path,
18
+ output_path: File.join(tmp_path, "Result.zip"))
19
19
 
20
- Actions::AppetizeAction.run(path: zipped_ipa,
20
+ Actions::AppetizeAction.run(path: zipped_bundle,
21
21
  api_token: params[:api_token])
22
22
 
23
23
  public_key = Actions.lane_context[SharedValues::APPETIZE_PUBLIC_KEY]
@@ -61,11 +61,10 @@ module Fastlane
61
61
  def self.available_options
62
62
  platform = Actions.lane_context[Actions::SharedValues::PLATFORM_NAME]
63
63
 
64
- ipa_path_default = nil
65
64
  if platform == :ios or platform.nil?
66
65
  ipa_path_default = Dir["*.ipa"].last
67
66
  end
68
- apk_path_default = nil
67
+
69
68
  if platform == :android
70
69
  apk_path_default = Dir["*.apk"].last || Dir[File.join("app", "build", "outputs", "apk", "app-release.apk")].last
71
70
  end
@@ -139,10 +139,10 @@ xcodebuild(
139
139
  app_path = Dir[File.join(tmp_path, "**", "*.app")].last
140
140
  UI.user_error!("Couldn't find app") unless app_path
141
141
 
142
- zipped_ipa = zip(path: app_path, output_path: File.join(tmp_path, "Result.zip"))
142
+ zipped_bundle = zip(path: app_path, output_path: File.join(tmp_path, "Result.zip"))
143
143
 
144
144
  appetize(
145
- path: zipped_ipa,
145
+ path: zipped_bundle,
146
146
  api_token: 'yourapitoken' # get it from https://appetize.io/docs#request-api-token
147
147
  )
148
148
 
@@ -19,8 +19,12 @@ module Danger
19
19
 
20
20
  devices ||= %w(iphone4s iphone5s iphone6s iphone6splus ipadair)
21
21
  languages ||= ["en"]
22
- prefix_command = "bundle exec" if File.exist?("Gemfile")
22
+
23
23
  prefix_command ||= ""
24
+ prefix_command += " bundle exec " if File.exist?("Gemfile")
25
+
26
+ # To use the local fastlane intead of bundle
27
+ prefix_command = "./bin/" if FastlaneCore::Helper.test?
24
28
 
25
29
  deep_link_matches = pr_body.match(/:link:\s(.*)/) # :link: emoji
26
30
  deep_link = deep_link_matches[1] if deep_link_matches
@@ -42,7 +46,7 @@ module Danger
42
46
  }
43
47
  params[:launch_url] = deep_link if deep_link
44
48
  params_str = params.collect { |k, v| "#{k}:\"#{v}\"" }.join(" ")
45
- url = `#{prefix_command} fastlane run appetize_viewing_url_generator #{params_str}`
49
+ url = Fastlane::Helper.backticks("#{prefix_command}fastlane run appetize_viewing_url_generator #{params_str}")
46
50
  url = url.match(%r{Result:.*(https\:\/\/.*)})[1].strip
47
51
 
48
52
  markdown("<a href='#{url}'>")
@@ -10,6 +10,9 @@ module Fastlane
10
10
  require 'excon'
11
11
  require 'base64'
12
12
 
13
+ # To still get the data when a repo has been moved
14
+ Excon.defaults[:middlewares] << Excon::Middleware::RedirectFollower
15
+
13
16
  server_url = params[:server_url]
14
17
  server_url = server_url[0..-2] if server_url.end_with? '/'
15
18
 
@@ -24,29 +24,57 @@ module Fastlane
24
24
 
25
25
  line = ""
26
26
  scheme = params[:scheme] || ""
27
+ target = params[:target] || ""
27
28
  results = []
28
29
 
29
30
  if Helper.test?
30
31
  results = [
31
- '"SampleProject.xcodeproj/../SchemeA/SchemeA-Info.plist"=4.3.2',
32
- '"SampleProject.xcodeproj/../SchemeATests/Info.plist"=4.3.2',
33
- '"SampleProject.xcodeproj/../SchemeB/SchemeB-Info.plist"=5.4.3',
34
- '"SampleProject.xcodeproj/../SchemeBTests/Info.plist"=5.4.3'
32
+ '$(date +%s)n /usr/libexec/Plistbuddy -c "Set CFBundleVersion $buildnum" "${plist}"n',
33
+ '"SampleProject.xcodeproj/../TargetA/TargetA-Info.plist"=4.3.2',
34
+ '"SampleProject.xcodeproj/../TargetATests/Info.plist"=4.3.2',
35
+ '"SampleProject.xcodeproj/../TargetB/TargetB-Info.plist"=5.4.3',
36
+ '"SampleProject.xcodeproj/../TargetBTests/Info.plist"=5.4.3',
37
+ '"SampleProject.xcodeproj/../SampleProject/supporting_files/TargetC_internal-Info.plist"=7.5.2',
38
+ '"SampleProject.xcodeproj/../SampleProject/supporting_files/TargetC_production-Info.plist"=6.4.9',
39
+ '"SampleProject.xcodeproj/../SampleProject_tests/Info.plist"=1.0'
35
40
  ]
36
41
  else
37
42
  results = (Actions.sh command).split("\n")
38
43
  end
39
44
 
40
- if scheme.empty?
41
- line = results.first unless results.first.nil?
42
- else
43
- scheme_string = "/#{scheme}/"
45
+ if target.empty? && scheme.empty?
46
+ # Sometimes the results array contains nonsense as the first element
47
+ # This iteration finds the first 'real' result and returns that
48
+ # emulating the actual behavior or the -terse1 flag correctly
49
+ project_string = ".xcodeproj"
44
50
  results.any? do |result|
45
- if result.include? scheme_string
51
+ if result.include? project_string
46
52
  line = result
47
53
  break
48
54
  end
49
55
  end
56
+ else
57
+ # This iteration finds the first folder structure or info plist
58
+ # matching the specified target
59
+ scheme_string = "/#{scheme}"
60
+ target_string = "/#{target}/"
61
+ plist_target_string = "/#{target}-"
62
+ results.any? do |result|
63
+ if !target.empty?
64
+ if result.include? target_string
65
+ line = result
66
+ break
67
+ elsif result.include? plist_target_string
68
+ line = result
69
+ break
70
+ end
71
+ else
72
+ if result.include? scheme_string
73
+ line = result
74
+ break
75
+ end
76
+ end
77
+ end
50
78
  end
51
79
 
52
80
  version_number = line.partition('=').last
@@ -87,7 +115,15 @@ module Fastlane
87
115
  end),
88
116
  FastlaneCore::ConfigItem.new(key: :scheme,
89
117
  env_name: "FL_VERSION_NUMBER_SCHEME",
90
- description: "Specify a specific scheme if you have multiple per project, optional",
118
+ description: "Specify a specific scheme if you have multiple per project, optional.
119
+ This parameter is deprecated and will be removed in a future release.
120
+ Please use the 'target' parameter instead. The behavior of this parameter
121
+ is currently undefined if your scheme name doesn't match your target name",
122
+ optional: true,
123
+ deprecated: true),
124
+ FastlaneCore::ConfigItem.new(key: :target,
125
+ env_name: "FL_VERSION_NUMBER_TARGET",
126
+ description: "Specify a specific target if you have multiple per project, optional",
91
127
  optional: true)
92
128
  ]
93
129
  end
@@ -0,0 +1,89 @@
1
+ module Fastlane
2
+ module Actions
3
+ class JiraAction < Action
4
+
5
+ def self.run(params)
6
+ Actions.verify_gem!('jira')
7
+ require 'jira'
8
+
9
+ site = params[:url]
10
+ context_path = ""
11
+ auth_type = :basic
12
+ username = params[:username]
13
+ password = params[:password]
14
+ ticket_id = params[:ticket_id]
15
+ comment_text = params[:comment_text]
16
+
17
+ options = {
18
+ site: site,
19
+ context_path: context_path,
20
+ auth_type: auth_type,
21
+ username: username,
22
+ password: password
23
+ }
24
+
25
+ client = JIRA::Client.new(options)
26
+ issue = client.Issue.find(ticket_id)
27
+ comment = issue.comments.build
28
+ comment.save({ 'body' => comment_text })
29
+ end
30
+
31
+ #####################################################
32
+ # @!group Documentation
33
+ #####################################################
34
+
35
+ def self.description
36
+ "Leave a comment on JIRA tickets"
37
+ end
38
+
39
+ def self.available_options
40
+ [
41
+ FastlaneCore::ConfigItem.new(key: :url,
42
+ env_name: "FL_JIRA_SITE",
43
+ description: "URL for Jira instance",
44
+ verify_block: proc do |value|
45
+ UI.user_error!("No url for Jira given, pass using `url: 'url'`") if value.to_s.length == 0
46
+ end),
47
+ FastlaneCore::ConfigItem.new(key: :username,
48
+ env_name: "FL_JIRA_USERNAME",
49
+ description: "Username for JIRA instance",
50
+ verify_block: proc do |value|
51
+ UI.user_error!("No username") if value.to_s.length == 0
52
+ end),
53
+ FastlaneCore::ConfigItem.new(key: :password,
54
+ env_name: "FL_JIRA_PASSWORD",
55
+ description: "Password for Jira",
56
+ verify_block: proc do |value|
57
+ UI.user_error!("No password") if value.to_s.length == 0
58
+ end),
59
+ FastlaneCore::ConfigItem.new(key: :ticket_id,
60
+ env_name: "FL_JIRA_TICKET_ID",
61
+ description: "Ticket ID for Jira, i.e. IOS-123",
62
+ verify_block: proc do |value|
63
+ UI.user_error!("No Ticket specified") if value.to_s.length == 0
64
+ end),
65
+ FastlaneCore::ConfigItem.new(key: :comment_text,
66
+ env_name: "FL_JIRA_COMMENT_TEXT",
67
+ description: "Text to add to the ticket as a comment",
68
+ verify_block: proc do |value|
69
+ UI.user_error!("No comment specified") if value.to_s.length == 0
70
+ end)
71
+ ]
72
+ end
73
+
74
+ def self.output
75
+ end
76
+
77
+ def self.return_value
78
+ end
79
+
80
+ def self.authors
81
+ ["iAmChrisTruman"]
82
+ end
83
+
84
+ def self.is_supported?(platform)
85
+ true
86
+ end
87
+ end
88
+ end
89
+ end
@@ -34,15 +34,12 @@ module Fastlane
34
34
 
35
35
  command :trigger do |c|
36
36
  c.syntax = 'fastlane [lane]'
37
- c.description = 'Drive the fastlane for a specific environment. Pass the lane name and optionally the platform first'
37
+ c.description = 'Run a sepcific lane. Pass the lane name and optionally the platform first.'
38
38
  c.option '--env STRING', String, 'Add environment to use with `dotenv`'
39
39
 
40
40
  c.action do |args, options|
41
- if Fastlane::FastlaneFolder.setup?
41
+ if ensure_fastfile
42
42
  Fastlane::CommandLineHandler.handle(args, options)
43
- else
44
- create = agree('Could not find fastlane in current directory. Would you like to set it up? (y/n)'.yellow, true)
45
- Fastlane::Setup.new.run if create
46
43
  end
47
44
  end
48
45
  end
@@ -73,13 +70,15 @@ module Fastlane
73
70
  c.option "-j", "--json", "Output the lanes in JSON instead of text"
74
71
 
75
72
  c.action do |args, options|
76
- require 'fastlane/lane_list'
77
- path = File.join(Fastlane::FastlaneFolder.path || '.', 'Fastfile')
78
-
79
- if options.json
80
- Fastlane::LaneList.output_json(path)
81
- else
82
- Fastlane::LaneList.output(path)
73
+ if ensure_fastfile
74
+ require 'fastlane/lane_list'
75
+ path = File.join(Fastlane::FastlaneFolder.fastfile_path)
76
+
77
+ if options.json
78
+ Fastlane::LaneList.output_json(path)
79
+ else
80
+ Fastlane::LaneList.output(path)
81
+ end
83
82
  end
84
83
  end
85
84
  end
@@ -88,12 +87,14 @@ module Fastlane
88
87
  c.syntax = 'fastlane list'
89
88
  c.description = 'Lists all available lanes without description'
90
89
  c.action do |args, options|
91
- ff = Fastlane::FastFile.new(File.join(Fastlane::FastlaneFolder.path || '.', 'Fastfile'))
92
- UI.message "Available lanes:"
93
- ff.runner.available_lanes.each do |lane|
94
- UI.message "- #{lane}"
90
+ if ensure_fastfile
91
+ ff = Fastlane::FastFile.new(Fastlane::FastlaneFolder.fastfile_path)
92
+ UI.message "Available lanes:"
93
+ ff.runner.available_lanes.each do |lane|
94
+ UI.message "- #{lane}"
95
+ end
96
+ UI.important "Execute using `fastlane [lane_name]`"
95
97
  end
96
- UI.important "Execute using `fastlane [lane_name]`"
97
98
  end
98
99
  end
99
100
 
@@ -103,9 +104,11 @@ module Fastlane
103
104
  c.option '-f', '--force', 'Overwrite the existing README.md in the ./fastlane folder'
104
105
 
105
106
  c.action do |args, options|
106
- ff = Fastlane::FastFile.new(File.join(Fastlane::FastlaneFolder.path || '.', 'Fastfile'))
107
- FastlaneCore::Helper.log.info "You don't need to run `fastlane docs` manually any more, this will be done automatically for you."
108
- Fastlane::DocsGenerator.run(ff)
107
+ if ensure_fastfile
108
+ ff = Fastlane::FastFile.new(File.join(Fastlane::FastlaneFolder.path || '.', 'Fastfile'))
109
+ UI.message "You don't need to run `fastlane docs` manually any more, this will be done automatically for you."
110
+ Fastlane::DocsGenerator.run(ff)
111
+ end
109
112
  end
110
113
  end
111
114
 
@@ -172,6 +175,18 @@ module Fastlane
172
175
  run!
173
176
  end
174
177
 
178
+ # Makes sure a Fastfile is available
179
+ # Shows an appropriate message to the user
180
+ # if that's not the case
181
+ # return true if the Fastfile is available
182
+ def ensure_fastfile
183
+ return true if Fastlane::FastlaneFolder.setup?
184
+
185
+ create = UI.confirm('Could not find fastlane in current directory. Would you like to set it up?')
186
+ Fastlane::Setup.new.run if create
187
+ return false
188
+ end
189
+
175
190
  # rubocop:enable Metrics/AbcSize
176
191
  # rubocop:enable Metrics/MethodLength
177
192
  end
@@ -13,14 +13,16 @@ module Fastlane
13
13
  return value
14
14
  end
15
15
 
16
+ # Path to the Fastfile inside the fastlane folder. This is nil when none is available
16
17
  def self.fastfile_path
17
- return nil if path.nil?
18
- File.join(path, "Fastfile")
18
+ path = File.join(self.path || '.', 'Fastfile')
19
+ return path if File.exist?(path)
20
+ return nil
19
21
  end
20
22
 
21
23
  # Does a fastlane configuration already exist?
22
24
  def self.setup?
23
- return false unless path
25
+ return false unless self.fastfile_path
24
26
  File.exist?(self.fastfile_path)
25
27
  end
26
28
 
@@ -3,7 +3,10 @@ module Fastlane
3
3
  class CrashlyticsHelper
4
4
  class << self
5
5
  def generate_ios_command(params)
6
- params[:crashlytics_path] = Dir["./Pods/iOS/Crashlytics/Crashlytics.framework"].last || Dir["./**/Crashlytics.framework"].last unless params[:crashlytics_path]
6
+ unless params[:crashlytics_path]
7
+ params[:crashlytics_path] = Dir["./Pods/iOS/Crashlytics/Crashlytics.framework"].last || Dir["./**/Crashlytics.framework"].last
8
+ end
9
+
7
10
  UI.user_error!("No value found for 'crashlytics_path'") unless params[:crashlytics_path]
8
11
  submit_binary = Dir[File.join(params[:crashlytics_path], '**', 'submit')].last
9
12
  submit_binary ||= "Crashlytics.framework/submit" if Helper.test?
@@ -9,7 +9,7 @@ module Fastlane
9
9
  UI.user_error!("platform must be a string") unless platform.kind_of?(String) or platform.nil?
10
10
  UI.user_error!("parameters must be a hash") unless parameters.kind_of?(Hash) or parameters.nil?
11
11
 
12
- ff = Fastlane::FastFile.new(File.join(Fastlane::FastlaneFolder.path, 'Fastfile'))
12
+ ff = Fastlane::FastFile.new(Fastlane::FastlaneFolder.fastfile_path)
13
13
 
14
14
  is_platform = false
15
15
  begin
@@ -1,4 +1,4 @@
1
1
  module Fastlane
2
- VERSION = '1.86.1'.freeze
2
+ VERSION = '1.87.0'.freeze
3
3
  DESCRIPTION = "The easiest way to automate building and releasing your iOS and Android apps"
4
4
  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.86.1
4
+ version: 1.87.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: 2016-05-05 00:00:00.000000000 Z
11
+ date: 2016-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: krausefx-shenzhen
@@ -268,7 +268,7 @@ dependencies:
268
268
  requirements:
269
269
  - - ">="
270
270
  - !ruby/object:Gem::Version
271
- version: 1.3.0
271
+ version: 1.3.1
272
272
  - - "<"
273
273
  - !ruby/object:Gem::Version
274
274
  version: 2.0.0
@@ -278,7 +278,7 @@ dependencies:
278
278
  requirements:
279
279
  - - ">="
280
280
  - !ruby/object:Gem::Version
281
- version: 1.3.0
281
+ version: 1.3.1
282
282
  - - "<"
283
283
  - !ruby/object:Gem::Version
284
284
  version: 2.0.0
@@ -348,7 +348,7 @@ dependencies:
348
348
  requirements:
349
349
  - - ">="
350
350
  - !ruby/object:Gem::Version
351
- version: 1.6.2
351
+ version: 1.6.3
352
352
  - - "<"
353
353
  - !ruby/object:Gem::Version
354
354
  version: 2.0.0
@@ -358,7 +358,7 @@ dependencies:
358
358
  requirements:
359
359
  - - ">="
360
360
  - !ruby/object:Gem::Version
361
- version: 1.6.2
361
+ version: 1.6.3
362
362
  - - "<"
363
363
  - !ruby/object:Gem::Version
364
364
  version: 2.0.0
@@ -765,6 +765,7 @@ files:
765
765
  - lib/fastlane/actions/ipa.rb
766
766
  - lib/fastlane/actions/is_ci.rb
767
767
  - lib/fastlane/actions/jazzy.rb
768
+ - lib/fastlane/actions/jira.rb
768
769
  - lib/fastlane/actions/lane_context.rb
769
770
  - lib/fastlane/actions/last_git_commit.rb
770
771
  - lib/fastlane/actions/last_git_tag.rb
@@ -907,9 +908,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
907
908
  version: '0'
908
909
  requirements: []
909
910
  rubyforge_project:
910
- rubygems_version: 2.4.0
911
+ rubygems_version: 2.5.1
911
912
  signing_key:
912
913
  specification_version: 4
913
914
  summary: The easiest way to automate building and releasing your iOS and Android apps
914
915
  test_files: []
915
- has_rdoc: