fastlane-plugin-instabug_official 0.2.1 → 0.3
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 16c54c18bcc8ec30e49641a6dd11c9427ead1aacef7e20e4b35fc5a3e9953a3a
|
4
|
+
data.tar.gz: b1fe30b20109e5ddaaf610f9600f935ce8e83eb58ab80e0d5cc017caebea7a18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 824acdb10f60e0fb1dbf4809cf4cdb8d7812d71fcd3bce1a046d8bd74fb48124fff344224703fe56142ef1d298e4081caae0d1b16d01ba765745eb83c9bdfe81
|
7
|
+
data.tar.gz: ac650a1c7329b7d88b6b897e34fbd9f63801cb3e529eb33b547899f03ae238acdf4c9765650e0d1a2507799818fa393c491da1f050d2e884ab6139121937efe3
|
data/README.md
CHANGED
@@ -12,27 +12,20 @@ fastlane add_plugin instabug_official
|
|
12
12
|
|
13
13
|
## About instabug_official
|
14
14
|
|
15
|
-
|
15
|
+
Upload dSYM files to Instabug
|
16
16
|
|
17
|
-
|
17
|
+
This action is used to upload symbolication files to Instabug. Incase you are not using bitcode, you can use this plug-in
|
18
|
+
with `gym` to upload dSYMs generated from your builds. If bitcode is enabled, you can use it with `download_dsyms` to upload dSYMs
|
19
|
+
from iTunes connect
|
18
20
|
|
19
21
|
## Example
|
20
22
|
|
21
|
-
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
|
22
|
-
|
23
|
-
**Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
|
24
|
-
|
25
|
-
## Run tests for this plugin
|
26
|
-
|
27
|
-
To run both the tests, and code style validation, run
|
28
|
-
|
29
23
|
```
|
30
|
-
|
24
|
+
instabug_official(api_token: "<Instabug token>")
|
31
25
|
```
|
32
26
|
|
33
|
-
To automatically fix many of the styling issues, use
|
34
27
|
```
|
35
|
-
|
28
|
+
instabug_official(api_token: "<Instabug token>", dsym_array_paths: ["./App1.dSYM.zip", "./App2.dSYM.zip"])
|
36
29
|
```
|
37
30
|
|
38
31
|
## Issues and Feedback
|
@@ -3,125 +3,131 @@ require 'fastlane/action'
|
|
3
3
|
require_relative '../helper/instabug_official_helper'
|
4
4
|
|
5
5
|
module Fastlane
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
command = build_single_file_command(command, directory_name)
|
32
|
-
|
33
|
-
puts command
|
34
|
-
|
35
|
-
result = Actions.sh(command)
|
36
|
-
if result == '200'
|
37
|
-
UI.success 'dSYM is successfully uploaded to Instabug 🤖'
|
38
|
-
UI.verbose 'Removing The directory'
|
39
|
-
remove_directory(directory_name)
|
40
|
-
else
|
41
|
-
UI.error "Something went wrong during Instabug dSYM upload. Status code is #{result}"
|
6
|
+
module Actions
|
7
|
+
class InstabugOfficialAction < Action
|
8
|
+
def self.run(params)
|
9
|
+
@instabug_dsyms_directory = 'Instabug_dsym_files_fastlane'
|
10
|
+
|
11
|
+
UI.verbose 'Running Instabug Action'
|
12
|
+
api_token = params[:api_token]
|
13
|
+
|
14
|
+
endpoint = 'https://api.instabug.com/api/sdk/v3/symbols_files'
|
15
|
+
command = "curl #{endpoint} --write-out %{http_code} --silent --output /dev/null -F os=\"ios\" -F application_token=\"#{api_token}\" -F symbols_file="
|
16
|
+
|
17
|
+
dsym_paths = []
|
18
|
+
# Add paths provided by the user
|
19
|
+
dsym_paths += (params[:dsym_array_paths] || [])
|
20
|
+
# Add dSYMs generaed by `gym`
|
21
|
+
dsym_paths += [Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH]] if Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH]
|
22
|
+
# Add dSYMs downloaded from iTC
|
23
|
+
dsym_paths += Actions.lane_context[SharedValues::DSYM_PATHS] if Actions.lane_context[SharedValues::DSYM_PATHS]
|
24
|
+
|
25
|
+
dsym_paths.uniq!
|
26
|
+
UI.verbose 'dsym_paths: ' + dsym_paths.inspect
|
27
|
+
|
28
|
+
if dsym_paths.empty?
|
29
|
+
UI.error "Fastlane dSYMs file is not found! make sure you're using Fastlane action [download_dsyms] to download your dSYMs from App Store Connect"
|
30
|
+
return
|
42
31
|
end
|
43
|
-
end
|
44
|
-
|
45
|
-
def self.description
|
46
|
-
'upload dsyms to fastlane'
|
47
|
-
end
|
48
32
|
|
49
|
-
|
50
|
-
['Instabug Inc.']
|
51
|
-
end
|
33
|
+
generate_instabug_directory
|
52
34
|
|
53
|
-
|
54
|
-
|
55
|
-
end
|
35
|
+
UI.verbose 'Directory name: ' + @instabug_dsyms_directory
|
36
|
+
copy_dsym_paths_into_directory(dsym_paths, @instabug_dsyms_directory)
|
56
37
|
|
57
|
-
|
58
|
-
# Optional:
|
59
|
-
'upload dsyms to fastlane'
|
60
|
-
end
|
38
|
+
command = build_single_file_command(command, @instabug_dsyms_directory)
|
61
39
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
end),
|
70
|
-
FastlaneCore::ConfigItem.new(key: :dsym_array_paths,
|
71
|
-
type: Array,
|
72
|
-
optional: true,
|
73
|
-
description: 'Array of paths to *.dSYM files')
|
74
|
-
]
|
75
|
-
end
|
40
|
+
result = Actions.sh(command)
|
41
|
+
if result == '200'
|
42
|
+
UI.success 'dSYM is successfully uploaded to Instabug 🤖'
|
43
|
+
UI.verbose 'Removing The directory'
|
44
|
+
else
|
45
|
+
UI.error "Something went wrong during Instabug dSYM upload. Status code is #{result}"
|
46
|
+
end
|
76
47
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
48
|
+
# Cleanup zip file and directory
|
49
|
+
cleanup_instabug_directory
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.description
|
53
|
+
"Upload dSYM files to Instabug"
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.details
|
57
|
+
"This action is used to upload symbolication files to Instabug. Incase you are not using bitcode, you can use this plug-in
|
58
|
+
with `gym` to upload dSYMs generated from your builds. If bitcode is enabled, you can use it with `download_dsyms` to upload dSYMs
|
59
|
+
from iTunes connect"
|
60
|
+
end
|
81
61
|
|
82
|
-
|
62
|
+
def self.authors
|
63
|
+
['Instabug Inc.']
|
64
|
+
end
|
83
65
|
|
84
|
-
def self.
|
85
|
-
|
86
|
-
end
|
66
|
+
def self.return_value
|
67
|
+
# If your method provides a return value, you can describe here what it does
|
68
|
+
end
|
87
69
|
|
88
|
-
def self.
|
89
|
-
|
90
|
-
|
70
|
+
def self.example_code
|
71
|
+
[
|
72
|
+
'instabug_official(api_token: "<Instabug token>")',
|
73
|
+
'instabug_official(api_token: "<Instabug token>", dsym_array_paths: ["./App1.dSYM.zip", "./App2.dSYM.zip"])'
|
74
|
+
]
|
75
|
+
end
|
91
76
|
|
92
|
-
def self.
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
77
|
+
def self.available_options
|
78
|
+
[
|
79
|
+
FastlaneCore::ConfigItem.new(key: :api_token,
|
80
|
+
env_name: 'FL_INSTABUG_API_TOKEN', # The name of the environment variable
|
81
|
+
description: 'API Token for Instabug', # a short description of this parameter
|
82
|
+
verify_block: proc do |value|
|
83
|
+
unless value && !value.empty?
|
84
|
+
UI.user_error!("No API token for InstabugAction given, pass using `api_token: 'token'`")
|
85
|
+
end
|
86
|
+
end),
|
87
|
+
FastlaneCore::ConfigItem.new(key: :dsym_array_paths,
|
88
|
+
type: Array,
|
89
|
+
optional: true,
|
90
|
+
description: 'Array of paths to *.dSYM files')
|
91
|
+
]
|
92
|
+
end
|
99
93
|
|
100
|
-
def self.
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
ZipAction.run(path: dsym_path).shellescape
|
105
|
-
end
|
106
|
-
command + "@\"#{file_path}\""
|
107
|
-
end
|
94
|
+
def self.is_supported?(platform)
|
95
|
+
platform == :ios
|
96
|
+
true
|
97
|
+
end
|
108
98
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
if paths.empty?
|
114
|
-
return ""
|
115
|
-
end
|
99
|
+
def self.generate_instabug_directory
|
100
|
+
cleanup_instabug_directory
|
101
|
+
FileUtils.mkdir_p @instabug_dsyms_directory
|
102
|
+
end
|
116
103
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
File.rename(iTunesConnectdSYMs, renamediTunesConnectdSYMs)
|
122
|
-
default_value = renamediTunesConnectdSYMs
|
123
|
-
end
|
104
|
+
def self.cleanup_instabug_directory
|
105
|
+
FileUtils.rm_f "#{@instabug_dsyms_directory}.zip"
|
106
|
+
FileUtils.rm_rf @instabug_dsyms_directory
|
107
|
+
end
|
124
108
|
|
125
|
-
|
126
|
-
|
109
|
+
def self.remove_directory(directory_path)
|
110
|
+
FileUtils.rm_rf directory_path
|
111
|
+
end
|
112
|
+
|
113
|
+
def self.copy_dsym_paths_into_directory(dsym_paths, directory_path)
|
114
|
+
dsym_paths.each do |path|
|
115
|
+
if File.extname(path) == '.dSYM'
|
116
|
+
FileUtils.copy_entry(path, "#{directory_path}/#{File.basename(path)}") if File.exist?(path)
|
117
|
+
else
|
118
|
+
Actions.sh("unzip #{path} -d #{directory_path}")
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
def self.build_single_file_command(command, dsym_path)
|
124
|
+
file_path = if dsym_path.end_with?('.zip')
|
125
|
+
dsym_path.shellescape
|
126
|
+
else
|
127
|
+
ZipAction.run(path: dsym_path).shellescape
|
128
|
+
end
|
129
|
+
command + "@\"#{file_path}\""
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
127
133
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-instabug_official
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Instabug
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -167,8 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
|
-
|
171
|
-
rubygems_version: 2.6.11
|
170
|
+
rubygems_version: 3.1.2
|
172
171
|
signing_key:
|
173
172
|
specification_version: 4
|
174
173
|
summary: Plugin to upload DSYMs to Instabug Dashboard.
|