fastlane-plugin-instabug 0.1.0 → 0.2
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 +4 -4
- data/README.md +11 -5
- data/lib/fastlane/plugin/instabug/actions/instabug.rb +19 -29
- data/lib/fastlane/plugin/instabug/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7389da58d135d7319d6dcabffe04637d6b72ed0
|
4
|
+
data.tar.gz: 6de5b73b2a55c2b54b881059de4371ba0d788ce6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
+
[](https://travis-ci.org/SiarheiFedartsou/fastlane-plugin-instabug)
|
3
3
|
[](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
|
-
|
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
|
-
|
30
|
-
UI.
|
23
|
+
if result == "200"
|
24
|
+
UI.success 'dSYM is successfully uploaded to Instabug 🤖'
|
31
25
|
else
|
32
|
-
UI.
|
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
|
-
|
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:
|
48
|
-
description:
|
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
|
-
|
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:
|
55
|
-
description:
|
56
|
-
|
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
|
-
|
60
|
-
|
61
|
-
|
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
|
-
[
|
59
|
+
['SiarheiFedartsou']
|
70
60
|
end
|
71
61
|
|
72
62
|
def self.is_supported?(platform)
|
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.
|
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-
|
11
|
+
date: 2016-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|