fastlane 0.1.2 → 0.1.3

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: a8e57997943c582fafba1fc9005757af2a43252c
4
- data.tar.gz: b55cc9e00c8cc3f0e90e2cae93263f9758a8ba1b
3
+ metadata.gz: 9e4012a426a0394bc705c8623914cbfc3f8f7423
4
+ data.tar.gz: 5a3c02a818eafd4336eb659f8d1f868fd22bde67
5
5
  SHA512:
6
- metadata.gz: 2c405b38e8700620c015b19c1ad79a793075d64911ffe88af7eab498fd96b501f3ebc35463fc26fc833c6803492cc6bedf32977964187c52d637fa9ddfc8ace7
7
- data.tar.gz: cdb1520235d1983d00a596f9d9aba33c3e73a9394c297bdddd6c0f0dede22b58f6e8a66a4c92581ced3ce24dc88098b18eb91ab3e347b9029abcafec9fdaeef4
6
+ metadata.gz: 3efac9b028b4d274510a54a9ed124da77a7871d531c67109cff37a6f932d8f8b699d80f311fe8d421135c72ad4f790d9e3d8d14d442f3ff85572677fa39bc859
7
+ data.tar.gz: 8b688a3af2896d0e5247e4552f685dfbf05ae258bbfb47b3d5c2d9a31239ad7fefc005c7c89710205341d3503964d61be888cce4fd51eb832cd186d25e535013
data/README.md CHANGED
@@ -199,6 +199,17 @@ Symbols will also be uploaded automatically if a `app.dSYM.zip` file is found ne
199
199
 
200
200
  More information about the available options can be found in the [HockeyApp Docs](http://support.hockeyapp.net/kb/api/api-versions#upload-version).
201
201
 
202
+ #### [Crashlytics Beta](http://try.crashlytics.com/beta/)
203
+ ```ruby
204
+ crashlytics({
205
+ crashlytics_path: './path', # path to your 'Crashlytics.framework'
206
+ api_token: '...',
207
+ build_secret: '...',
208
+ ipa_path: './app.ipa'
209
+ })
210
+ ```
211
+ Additionally you can specify `notes_path`, `emails` and `groups`.
212
+
202
213
  #### [Slack](http://slack.com)
203
214
  Send a message to **#channel** (by default) or a direct message to **@username** with success (green) or failure (red) status.
204
215
 
@@ -0,0 +1,70 @@
1
+ # TODO: Workaround, since crashlytics.rb from shenzhen includes the code for commander.
2
+ def command(param)
3
+ end
4
+
5
+ module Fastlane
6
+ module Actions
7
+ class CrashlyticsAction
8
+ def self.run(params)
9
+ require "shenzhen"
10
+ require "shenzhen/plugins/crashlytics"
11
+
12
+ params = params.first
13
+
14
+ raise "You have to pass Crashlytics parameters to the Crashlytics action, take a look at https://github.com/KrauseFx/fastlane#crashlytics".red unless params
15
+
16
+ crashlytics_path = params[:crashlytics_path]
17
+ api_token = params[:api_token]
18
+ build_secret = params[:build_secret]
19
+ ipa_path = params[:ipa_path]
20
+ notes_path = params[:notes_path]
21
+ emails = params[:emails]
22
+ groups = params[:groups]
23
+
24
+ assert_valid_params!(crashlytics_path, api_token, build_secret, ipa_path)
25
+
26
+ Helper.log.info "Uploading the IPA to Crashlytics. Go for a coffee ☕️.".green
27
+
28
+ return if Helper.is_test?
29
+
30
+ client = Shenzhen::Plugins::Crashlytics::Client.new(crashlytics_path, api_token, build_secret)
31
+
32
+ response = client.upload_build(ipa_path, file: ipa_path, notes: notes_path, emails: emails, groups: groups)
33
+
34
+ if response
35
+ Helper.log.info "Build successfully uploaded to Crashlytics".green
36
+ else
37
+ Helper.log.fatal "Error uploading to Crashlytics."
38
+ raise "Error when trying to upload ipa to Crashlytics".red
39
+ end
40
+ end
41
+
42
+ def self.assert_valid_params!(crashlytics_path, api_token, build_secret, ipa_path)
43
+ assert_valid_crashlytics_path!(crashlytics_path)
44
+ assert_valid_api_token!(api_token)
45
+ assert_valid_build_secret!(build_secret)
46
+ assert_valid_ipa_path!(ipa_path)
47
+ end
48
+
49
+ def self.assert_valid_crashlytics_path!(crashlytics_path)
50
+ return if crashlytics_path && File.exists?(crashlytics_path)
51
+ raise "No Crashlytics path given or found, pass using `crashlytics_path: 'path'`".red
52
+ end
53
+
54
+ def self.assert_valid_api_token!(token)
55
+ return unless token.nil? || token.empty?
56
+ raise "No API token for Crashlytics given, pass using `api_token: 'token'`".red
57
+ end
58
+
59
+ def self.assert_valid_build_secret!(build_secret)
60
+ return unless build_secret.nil? || build_secret.empty?
61
+ raise "No build secret for Crashlytics given, pass using `build_secret: 'secret'`".red
62
+ end
63
+
64
+ def self.assert_valid_ipa_path!(ipa_path)
65
+ return if ipa_path && File.exists?(ipa_path)
66
+ raise "No IPA file given or found, pass using `ipa_path: 'path/app.ipa'`".red
67
+ end
68
+ end
69
+ end
70
+ end
@@ -25,8 +25,10 @@ module Fastlane
25
25
  notifier = Slack::Notifier.new url
26
26
 
27
27
  notifier.username = 'fastlane'
28
- notifier.channel = "#{options[:channel]}" if options[:channel].to_s.length > 0
29
- notifier.channel = "##{notifier.channel}" unless ["#", "@"].include? notifier.channel[0] # send message to channel by default
28
+ if options[:channel].to_s.length > 0
29
+ notifier.channel = options[:channel]
30
+ notifier.channel = ('#' + notifier.channel) unless ["#", "@"].include?notifier.channel[0] # send message to channel by default
31
+ end
30
32
 
31
33
  test_result = {
32
34
  fallback: options[:message],
@@ -1,3 +1,3 @@
1
1
  module Fastlane
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
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: 0.1.2
4
+ version: 0.1.3
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-01-28 00:00:00.000000000 Z
11
+ date: 2015-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -293,6 +293,7 @@ files:
293
293
  - lib/fastlane.rb
294
294
  - lib/fastlane/actions/README
295
295
  - lib/fastlane/actions/actions_helper.rb
296
+ - lib/fastlane/actions/crashlytics.rb
296
297
  - lib/fastlane/actions/deliver.rb
297
298
  - lib/fastlane/actions/frameit.rb
298
299
  - lib/fastlane/actions/hockey.rb