fastlane-plugin-instabug 0.1.0 → 0.2

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: 65d0cd6198a03710afbe292983d1a7192accc0c5
4
- data.tar.gz: 3a49fc150dd1d4e53545e9893c9b9aa53f71f440
3
+ metadata.gz: d7389da58d135d7319d6dcabffe04637d6b72ed0
4
+ data.tar.gz: 6de5b73b2a55c2b54b881059de4371ba0d788ce6
5
5
  SHA512:
6
- metadata.gz: 12dc58d8c061e3bb18ff46d7a2c93ac5c7d4cfb45a278c316570bd6853541ca52bb6e0c95f133dbc5b64a55a38436bd13c7985b36d463d3038b5964bbc1ddcb6
7
- data.tar.gz: ee887b535084af64264a87e27fd519f579ab30224797569187ac699a3cc21639f0994a76800b9568aaf8a1341ede60e0a3b1f2e74735cc73e6607f9b445eb7df
6
+ metadata.gz: 65618844280d81adf7b23a7e57dd21e22bcadb634bea9e1efb46fa51f219fdf525f765e9e0f5f79f7d780dae9c6c62237a5b99ed775a64870b8ad9c09003748a
7
+ data.tar.gz: 80076f8d5ed5c6ae3ed6bf814b6d4f8d317b82759b06d960a965f6c7b5ad536e654a4ee8f47c7a872925126ed6dc59cdab77164254f389b2602be35b2963fc4f
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
- # instabug plugin
2
-
1
+ # [Instabug](https://instabug.com/) plugin
2
+ [![CI Status](http://img.shields.io/travis/SiarheiFedartsou/fastlane-plugin-instabug.svg?style=flat)](https://travis-ci.org/SiarheiFedartsou/fastlane-plugin-instabug)
3
3
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-instabug)
4
4
 
5
5
  ## Getting Started
@@ -12,9 +12,7 @@ fastlane add_plugin instabug
12
12
 
13
13
  ## About instabug
14
14
 
15
- Uploads dSYM to Instabug
16
-
17
- **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
15
+ Uploads dSYM to [Instabug](https://instabug.com/)
18
16
 
19
17
  ## Actions
20
18
 
@@ -22,7 +20,15 @@ Uploads dSYM to Instabug
22
20
 
23
21
  ```ruby
24
22
  instabug(api_token: 'INSTABUG_TOKEN',
23
+ <<<<<<< HEAD
24
+ # DSYM_OUTPUT_PATH by default (generated by gym command).
25
+ # Should be *.zip-file, if not it will be zipped automatically
25
26
  dsym_path: '/path/to/dsym')
27
+ =======
28
+ # if dsym_path or dsym_zip_path will not be provided, then instabug will try to find path to dSYM
29
+ # in lane_context by DSYM_ZIP_PATH key(which produced by dsym_zip action)
30
+ dsym_path: '/path/to/dsym')
31
+ >>>>>>> origin/master
26
32
  ```
27
33
 
28
34
  For more information see `fastlane action instabug`.
@@ -3,20 +3,14 @@ module Fastlane
3
3
  class InstabugAction < Action
4
4
  def self.run(params)
5
5
  api_token = params[:api_token]
6
- if params[:dsym_path]
6
+
7
+ if params[:dsym_path].end_with?('.zip')
8
+ dsym_zip_path = params[:dsym_path].shellescape
9
+ else
7
10
  dsym_path = params[:dsym_path]
8
- UI.user_error! "Provided dSYM doesn't exists" unless File.exist?(dsym_path)
9
11
  dsym_zip_path = ZipAction.run(path: dsym_path).shellescape
10
- elsif params[:dsym_zip_path]
11
- UI.user_error! "Provided dSYM.zip doesn't exists" unless File.exist?(params[:dsym_zip_path])
12
- dsym_zip_path = params[:dsym_zip_path].shellescape
13
- elsif Actions.lane_context[SharedValues::DSYM_ZIP_PATH]
14
- dsym_zip_path = Actions.lane_context[SharedValues::DSYM_ZIP_PATH].shellescape
15
- else
16
- UI.user_error! "Cannot find dSYM"
17
12
  end
18
13
 
19
-
20
14
  endpoint = 'https://api.instabug.com/api/ios/v1/dsym'
21
15
 
22
16
  command = "curl #{endpoint} --write-out %{http_code} --silent --output /dev/null -F dsym=@\"#{dsym_zip_path}\" -F token=\"#{api_token}\""
@@ -26,10 +20,10 @@ module Fastlane
26
20
  return command if Helper.test?
27
21
 
28
22
  result = Actions.sh(command)
29
- unless result == 200
30
- UI.error "Something went wrong during Instabug dSYM upload"
23
+ if result == "200"
24
+ UI.success 'dSYM is successfully uploaded to Instabug 🤖'
31
25
  else
32
- UI.success "dSYM is successfully uploaded to instabug"
26
+ UI.error "Something went wrong during Instabug dSYM upload. Status code is #{result}"
33
27
  end
34
28
  end
35
29
 
@@ -38,35 +32,31 @@ module Fastlane
38
32
  #####################################################
39
33
 
40
34
  def self.description
41
- "Instabug dSYM uploading"
35
+ 'Instabug dSYM uploading'
42
36
  end
43
37
 
44
38
  def self.available_options
45
39
  [
46
40
  FastlaneCore::ConfigItem.new(key: :api_token,
47
- env_name: "FL_INSTABUG_API_TOKEN", # The name of the environment variable
48
- description: "API Token for Instabug", # a short description of this parameter
41
+ env_name: 'FL_INSTABUG_API_TOKEN', # The name of the environment variable
42
+ description: 'API Token for Instabug', # a short description of this parameter
49
43
  verify_block: proc do |value|
50
- UI.user_error!("No API token for InstabugAction given, pass using `api_token: 'token'`") unless (value and not value.empty?)
51
- # UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
44
+ UI.user_error!("No API token for InstabugAction given, pass using `api_token: 'token'`") unless value && !value.empty?
52
45
  end),
53
46
  FastlaneCore::ConfigItem.new(key: :dsym_path,
54
- env_name: "FL_INSTABUG_DSYM_PATH",
55
- description: "Path to *.dSYM file",
56
- conflicting_options: [:dsym_zip_path],
47
+ env_name: 'FL_INSTABUG_DSYM_PATH',
48
+ description: 'Path to *.dSYM file',
49
+ default_value: Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH],
57
50
  is_string: true,
58
- optional: true),
59
- FastlaneCore::ConfigItem.new(key: :dsym_zip_path,
60
- env_name: "FL_INSTABUG_DSYM_ZIP_PATH",
61
- description: "Path to *.dSYM.zip file",
62
- conflicting_options: [:dsym_path],
63
- is_string: true,
64
- optional: true)
51
+ optional: true,
52
+ verify_block: proc do |value|
53
+ UI.user_error!("dSYM file doesn't exists") unless File.exist?(value)
54
+ end)
65
55
  ]
66
56
  end
67
57
 
68
58
  def self.authors
69
- ["SiarheiFedartsou"]
59
+ ['SiarheiFedartsou']
70
60
  end
71
61
 
72
62
  def self.is_supported?(platform)
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Instabug
3
- VERSION = "0.1.0"
3
+ VERSION = '0.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-instabug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siarhei Fiedartsou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-05 00:00:00.000000000 Z
11
+ date: 2016-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry