fastlane 1.64.0 → 1.65.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: 45dd5cf53c7177ddb32515a4ea523968bed241e7
4
- data.tar.gz: 6180e4b81438d84dddd2a2c90a92c98693519f88
3
+ metadata.gz: 9e759626e063ddfcef9ffba2c8f957d97096f60f
4
+ data.tar.gz: a3dd1d6f6e6228d309c8c374d4e7ee511a5ce699
5
5
  SHA512:
6
- metadata.gz: e345f385b400bfd8703fb8b65b5760a957e33d583e17f0c0439969e310cca79e7a13b0cf271da5095409e9cdbd21e349d20447689e17d63dbe7135596e64df0a
7
- data.tar.gz: 6b14e133ff543454b3919295a6f67437636b817795bdcdc9718310ad68f30bdb3b9eb665c64261a745ae21bb770de897ca36d618257814b9350ee7616fe87af4
6
+ metadata.gz: 21084918f23cbf71b2641aa709ce20a301580f52bb2bc1235fd041a9c623607fbaf8fa0f0b8b134cd195169fc3b60ddf6a50e7396e540cb7c11db65c76c13058
7
+ data.tar.gz: f41aaad6052def5c784f3a0b69804a1f84227444afec0344d869644d311ce001cf0e71e997b5efcbc3139dcafbf9a194545b79fe62d0da1df87c99a0e963ad81
@@ -89,7 +89,8 @@ module Fastlane
89
89
 
90
90
  # get the absolute paths to the files
91
91
  git_add_paths = expected_changed_files.map do |path|
92
- File.expand_path(File.join(repo_pathname, path.gsub("$(SRCROOT)", ".")))
92
+ updated = path.gsub("$(SRCROOT)", ".").gsub("${SRCROOT}", ".")
93
+ File.expand_path(File.join(repo_pathname, updated))
93
94
  end
94
95
 
95
96
  # then create a commit with a message
@@ -3,9 +3,9 @@ module Fastlane
3
3
  class GitAddAction < Action
4
4
  def self.run(params)
5
5
  if params[:path].kind_of?(String)
6
- paths = "'#{params[:path]}'"
6
+ paths = params[:path].shellescape
7
7
  else
8
- paths = params[:path].join(" ")
8
+ paths = params[:path].map(&:shellescape).join(' ')
9
9
  end
10
10
 
11
11
  result = Actions.sh("git add #{paths}")
@@ -3,9 +3,9 @@ module Fastlane
3
3
  class GitCommitAction < Action
4
4
  def self.run(params)
5
5
  if params[:path].kind_of?(String)
6
- paths = "'#{params[:path]}'"
6
+ paths = params[:path].shellescape
7
7
  else
8
- paths = params[:path].map {|path| "'#{path}'" }.join(" ")
8
+ paths = params[:path].map(&:shellescape).join(' ')
9
9
  end
10
10
 
11
11
  result = Actions.sh("git commit -m '#{params[:message]}' #{paths}")
@@ -59,7 +59,7 @@ module Fastlane
59
59
  Helper.log.info 'Build successfully uploaded to HockeyApp!'.green
60
60
  else
61
61
  if response.body.to_s.include?("App could not be created")
62
- raise "Hockey has an issue processing this app. Please pass the :public_identifier option you can get from the Hockey website. More information https://github.com/fastlane/fastlane/issues/400"
62
+ raise "Hockey has an issue processing this app. Please confirm that an app in Hockey matches this IPA's bundle ID or that you are using the correct API upload token. If error persists, please provide the :public_identifier option from the HockeyApp website. More information https://github.com/fastlane/fastlane/issues/400"
63
63
  else
64
64
  raise "Error when trying to upload ipa to HockeyApp: #{response.body}".red
65
65
  end
@@ -90,11 +90,19 @@ module Fastlane
90
90
  ENV[SharedValues::S3_IPA_OUTPUT_PATH.to_s] = ipa_url
91
91
 
92
92
  if dsym_file
93
- dsym_file_name = File.basename(dsym_file)
94
- dsym_url = "https://#{s3_subdomain}.amazonaws.com/#{s3_bucket}/#{url_part}#{dsym_file_name}"
93
+ dsym_file_basename = File.basename(dsym_file)
94
+ dsym_file_name = "#{url_part}#{dsym_file_basename}"
95
+ dsym_file_data = File.open(dsym_file, 'rb')
96
+
97
+ upload_dsym(
98
+ s3_access_key,
99
+ s3_secret_access_key,
100
+ s3_bucket,
101
+ s3_region,
102
+ dsym_file_name,
103
+ dsym_file_data
104
+ )
95
105
 
96
- Actions.lane_context[SharedValues::S3_DSYM_OUTPUT_PATH] = dsym_url
97
- ENV[SharedValues::S3_DSYM_OUTPUT_PATH.to_s] = dsym_url
98
106
  end
99
107
 
100
108
  if params[:upload_metadata] == false
@@ -241,7 +249,7 @@ module Fastlane
241
249
  version_obj = version_obj.object
242
250
  end
243
251
 
244
- # Setting actionand environment variables
252
+ # Setting action and environment variables
245
253
  Actions.lane_context[SharedValues::S3_PLIST_OUTPUT_PATH] = plist_obj.public_url.to_s
246
254
  ENV[SharedValues::S3_PLIST_OUTPUT_PATH.to_s] = plist_obj.public_url.to_s
247
255
 
@@ -254,6 +262,39 @@ module Fastlane
254
262
  Helper.log.info "Successfully uploaded ipa file to '#{Actions.lane_context[SharedValues::S3_IPA_OUTPUT_PATH]}'".green
255
263
  end
256
264
 
265
+ def self.upload_dsym(s3_access_key, s3_secret_access_key, s3_bucket, s3_region, dsym_file_name, dsym_file_data)
266
+ Actions.verify_gem!('aws-sdk')
267
+ require 'aws-sdk'
268
+ if s3_region
269
+ s3_client = AWS::S3.new(
270
+ access_key_id: s3_access_key,
271
+ secret_access_key: s3_secret_access_key,
272
+ region: s3_region
273
+ )
274
+ else
275
+ s3_client = AWS::S3.new(
276
+ access_key_id: s3_access_key,
277
+ secret_access_key: s3_secret_access_key
278
+ )
279
+ end
280
+
281
+ bucket = s3_client.buckets[s3_bucket]
282
+
283
+ dsym_obj = bucket.objects.create(dsym_file_name, dsym_file_data, acl: :public_read)
284
+
285
+ # When you enable versioning on a S3 bucket,
286
+ # writing to an object will create an object version
287
+ # instead of replacing the existing object.
288
+ # http://docs.aws.amazon.com/AWSRubySDK/latest/AWS/S3/ObjectVersion.html
289
+ if dsym_obj.kind_of? AWS::S3::ObjectVersion
290
+ dsym_obj = dsym_obj.object
291
+ end
292
+
293
+ # Setting action and environment variables
294
+ Actions.lane_context[SharedValues::S3_DSYM_OUTPUT_PATH] = dsym_obj.public_url.to_s
295
+ ENV[SharedValues::S3_DSYM_OUTPUT_PATH.to_s] = dsym_obj.public_url.to_s
296
+ end
297
+
257
298
  #
258
299
  # NOT a fan of this as this was taken straight from Shenzhen
259
300
  # https://github.com/nomad/shenzhen/blob/986792db5d4d16a80c865a2748ee96ba63644821/lib/shenzhen/plugins/s3.rb#L32
@@ -6,7 +6,6 @@ module Fastlane
6
6
 
7
7
  class ScreengrabAction < Action
8
8
  def self.run(params)
9
- UI.user_error! "screengrab currently only supports running on a Mac" unless Helper.mac?
10
9
  require 'screengrab'
11
10
 
12
11
  begin
@@ -27,11 +27,8 @@ module Fastlane
27
27
 
28
28
  notifier = Slack::Notifier.new(options[:slack_url])
29
29
 
30
- if options[:username].to_s.length > 0
31
- notifier.username = options[:username]
32
- else
33
- notifier.username = 'fastlane'
34
- end
30
+ notifier.username = options[:use_webhook_configured_username_and_icon] ? nil : options[:username]
31
+ icon_url = options[:use_webhook_configured_username_and_icon] ? nil : options[:icon_url]
35
32
 
36
33
  if options[:channel].to_s.length > 0
37
34
  notifier.channel = options[:channel]
@@ -42,15 +39,9 @@ module Fastlane
42
39
 
43
40
  return [notifier, slack_attachment] if Helper.is_test? # tests will verify the slack attachments and other properties
44
41
 
45
- if options[:icon_url].to_s.length > 0
46
- result = notifier.ping '',
47
- icon_url: options[:icon_url],
48
- attachments: [slack_attachment]
49
- else
50
- result = notifier.ping '',
51
- icon_url: 'https://s3-eu-west-1.amazonaws.com/fastlane.tools/fastlane.png',
52
- attachments: [slack_attachment]
53
- end
42
+ result = notifier.ping '',
43
+ icon_url: icon_url,
44
+ attachments: [slack_attachment]
54
45
 
55
46
  if result.code.to_i == 200
56
47
  Helper.log.info 'Successfully sent Slack notification'.green
@@ -66,14 +57,6 @@ module Fastlane
66
57
 
67
58
  def self.available_options
68
59
  [
69
- FastlaneCore::ConfigItem.new(key: :username,
70
- env_name: "FL_SLACK_USERNAME",
71
- description: "The username that should be displayed on Slack",
72
- optional: true),
73
- FastlaneCore::ConfigItem.new(key: :icon_url,
74
- env_name: "FL_SLACK_ICON_URL",
75
- description: "The URL of the icon that should be displayed on Slack",
76
- optional: true),
77
60
  FastlaneCore::ConfigItem.new(key: :message,
78
61
  env_name: "FL_SLACK_MESSAGE",
79
62
  description: "The message that should be displayed on Slack. This supports the standard Slack markup language",
@@ -82,12 +65,30 @@ module Fastlane
82
65
  env_name: "FL_SLACK_CHANNEL",
83
66
  description: "#channel or @username",
84
67
  optional: true),
68
+ FastlaneCore::ConfigItem.new(key: :use_webhook_configured_username_and_icon,
69
+ env_name: "FL_SLACK_USE_WEBHOOK_CONFIGURED_USERNAME_AND_ICON",
70
+ description: "Use webook's default username and icon settings? (true/false)",
71
+ default_value: false,
72
+ is_string: false,
73
+ optional: true),
85
74
  FastlaneCore::ConfigItem.new(key: :slack_url,
86
75
  env_name: "SLACK_URL",
87
76
  description: "Create an Incoming WebHook for your Slack group",
88
77
  verify_block: proc do |value|
89
78
  raise "Invalid URL, must start with https://" unless value.start_with? "https://"
90
79
  end),
80
+ FastlaneCore::ConfigItem.new(key: :username,
81
+ env_name: "FL_SLACK_USERNAME",
82
+ description: "Overrides the webook's username property if use_webhook_configured_username_and_icon is false",
83
+ default_value: "fastlane",
84
+ is_string: true,
85
+ optional: true),
86
+ FastlaneCore::ConfigItem.new(key: :icon_url,
87
+ env_name: "FL_SLACK_ICON_URL",
88
+ description: "Overrides the webook's image property if use_webhook_configured_username_and_icon is false",
89
+ default_value: "https://s3-eu-west-1.amazonaws.com/fastlane.tools/fastlane.png",
90
+ is_string: true,
91
+ optional: true),
91
92
  FastlaneCore::ConfigItem.new(key: :payload,
92
93
  env_name: "FL_SLACK_PAYLOAD",
93
94
  description: "Add additional information to this post. payload must be a hash containg any key with any value",
@@ -1,3 +1,3 @@
1
1
  module Fastlane
2
- VERSION = '1.64.0'.freeze
2
+ VERSION = '1.65.0'.freeze
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.64.0
4
+ version: 1.65.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-03-01 00:00:00.000000000 Z
11
+ date: 2016-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: krausefx-shenzhen
@@ -174,7 +174,7 @@ dependencies:
174
174
  requirements:
175
175
  - - ">="
176
176
  - !ruby/object:Gem::Version
177
- version: 0.19.4
177
+ version: 0.22.0
178
178
  - - "<"
179
179
  - !ruby/object:Gem::Version
180
180
  version: 1.0.0
@@ -184,7 +184,7 @@ dependencies:
184
184
  requirements:
185
185
  - - ">="
186
186
  - !ruby/object:Gem::Version
187
- version: 0.19.4
187
+ version: 0.22.0
188
188
  - - "<"
189
189
  - !ruby/object:Gem::Version
190
190
  version: 1.0.0
@@ -830,7 +830,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
830
830
  version: '0'
831
831
  requirements: []
832
832
  rubyforge_project:
833
- rubygems_version: 2.2.2
833
+ rubygems_version: 2.4.0
834
834
  signing_key:
835
835
  specification_version: 4
836
836
  summary: Connect all iOS deployment tools into one streamlined workflow