fastlane-plugin-emerge 0.4.0 → 0.5.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 498e4fcfd1dfcae9df9fddd6b7eeee5225d031ed4ec49a79ddbb1fbb45c9599c
|
4
|
+
data.tar.gz: 878861b1e1d4569bee5171f598e97a4dbcfa7b0ef5518c64a89446a6d66befa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a41d64017cd4a2fce676ccd04928f704c65aa62852213ac5675f93a6dd88fe49cf5f3221956dd15fb8b392c57ccbd007723787475c85883c811055bb11383260
|
7
|
+
data.tar.gz: d132f4dd65ee4ee6695d232b6b069fa78e27db9ca96df239fed0a2e762b0cb89ea748821ddeaecb0637720a2d367a7dd9883fa9dc36d5e30a537eb781f712589
|
@@ -23,6 +23,7 @@ module Fastlane
|
|
23
23
|
repo_name = params[:repo_name]
|
24
24
|
gitlab_project_id = params[:gitlab_project_id]
|
25
25
|
build_type = params[:build_type]
|
26
|
+
order_file_version = params[:order_file_version]
|
26
27
|
|
27
28
|
if file_path == nil || !File.exist?(file_path)
|
28
29
|
UI.error("Invalid input file")
|
@@ -38,6 +39,13 @@ module Fastlane
|
|
38
39
|
dsym_folder = "#{d}/archive.xcarchive/dSYMs/"
|
39
40
|
FileUtils.mkdir_p application_folder
|
40
41
|
FileUtils.mkdir_p dsym_folder
|
42
|
+
if params[:linkmaps] && params[:linkmaps].length > 0
|
43
|
+
linkmap_folder = "#{d}/archive.xcarchive/Linkmaps/"
|
44
|
+
FileUtils.mkdir_p(linkmap_folder)
|
45
|
+
params[:linkmaps].each do |l|
|
46
|
+
FileUtils.cp(l, linkmap_folder)
|
47
|
+
end
|
48
|
+
end
|
41
49
|
FileUtils.cp_r(file_path, application_folder)
|
42
50
|
copy_dsyms("#{absolute_path.dirname}/*.dsym", dsym_folder)
|
43
51
|
copy_dsyms("#{absolute_path.dirname}/*/*.dsym", dsym_folder)
|
@@ -52,12 +60,21 @@ module Fastlane
|
|
52
60
|
end
|
53
61
|
elsif File.extname(file_path) == '.xcarchive'
|
54
62
|
zip_path = file_path + ".zip"
|
63
|
+
if params[:linkmaps] && params[:linkmaps].length > 0
|
64
|
+
linkmap_folder = "#{file_path}/Linkmaps/"
|
65
|
+
FileUtils.mkdir_p(linkmap_folder)
|
66
|
+
params[:linkmaps].each do |l|
|
67
|
+
FileUtils.cp(l, linkmap_folder)
|
68
|
+
end
|
69
|
+
end
|
55
70
|
Actions::ZipAction.run(
|
56
71
|
path: file_path,
|
57
72
|
output_path: zip_path,
|
58
73
|
exclude: [],
|
59
74
|
include: [])
|
60
75
|
file_path = zip_path
|
76
|
+
elsif File.extname(file_path) == '.zip' && params[:linkmaps] && params[:linkmaps].length > 0
|
77
|
+
UI.error("Provided zipped archive and linkmaps, linkmaps will not be added to zip.")
|
61
78
|
elsif !File.extname(file_path) == '.zip'
|
62
79
|
UI.error("Invalid input file")
|
63
80
|
return
|
@@ -86,6 +103,9 @@ module Fastlane
|
|
86
103
|
if gitlab_project_id
|
87
104
|
params[:gitlabProjectId] = gitlab_project_id
|
88
105
|
end
|
106
|
+
if order_file_version
|
107
|
+
params[:orderFileVersion] = order_file_version
|
108
|
+
end
|
89
109
|
params[:buildType] = build_type || "development"
|
90
110
|
FastlaneCore::PrintTable.print_values(
|
91
111
|
config: params,
|
@@ -145,6 +165,10 @@ module Fastlane
|
|
145
165
|
description: "Path to the zipped xcarchive or app to upload",
|
146
166
|
optional: true,
|
147
167
|
type: String),
|
168
|
+
FastlaneCore::ConfigItem.new(key: :linkmaps,
|
169
|
+
description: "List of paths to linkmaps",
|
170
|
+
optional: true,
|
171
|
+
type: Array),
|
148
172
|
FastlaneCore::ConfigItem.new(key: :pr_number,
|
149
173
|
description: "The PR number that triggered this upload",
|
150
174
|
optional: true,
|
@@ -182,7 +206,11 @@ module Fastlane
|
|
182
206
|
FastlaneCore::ConfigItem.new(key: :build_type,
|
183
207
|
description: "String to identify the type of build such as release/development. Used to filter size graphs. Defaults to development",
|
184
208
|
optional: true,
|
185
|
-
type: String)
|
209
|
+
type: String),
|
210
|
+
FastlaneCore::ConfigItem.new(key: :order_file_version,
|
211
|
+
description: "Version of the order file to download",
|
212
|
+
optional: true,
|
213
|
+
type: String),
|
186
214
|
]
|
187
215
|
end
|
188
216
|
|
@@ -0,0 +1,70 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require 'tmpdir'
|
3
|
+
require 'tempfile'
|
4
|
+
require 'fileutils'
|
5
|
+
|
6
|
+
module Fastlane
|
7
|
+
module Actions
|
8
|
+
class EmergeOrderFileAction < Action
|
9
|
+
def self.run(params)
|
10
|
+
puts "https://order-files-prod.emergetools.com/#{params[:app_id]}/#{params[:order_file_version]}"
|
11
|
+
resp = Faraday.get("https://order-files-prod.emergetools.com/#{params[:app_id]}/#{params[:order_file_version]}", nil, {'X-API-Token' => params[:api_token]})
|
12
|
+
case resp.status
|
13
|
+
when 200
|
14
|
+
Tempfile.create do |f|
|
15
|
+
f.write(resp.body)
|
16
|
+
decompressed = IO.popen(['gunzip', '-c', f.path]).read
|
17
|
+
IO.write(params[:output_path], decompressed)
|
18
|
+
end
|
19
|
+
when 401
|
20
|
+
UI.error("Unauthorized")
|
21
|
+
else
|
22
|
+
UI.error("Failed to download order file code: #{resp.status}")
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
def self.description
|
27
|
+
"Fastlane plugin to download order files"
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.authors
|
31
|
+
["Emerge Tools"]
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.return_value
|
35
|
+
# If your method provides a return value, you can describe here what it does
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.details
|
39
|
+
# Optional:
|
40
|
+
""
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.available_options
|
44
|
+
[
|
45
|
+
FastlaneCore::ConfigItem.new(key: :api_token,
|
46
|
+
env_name: "EMERGE_API_TOKEN",
|
47
|
+
description: "An API token for Emerge",
|
48
|
+
optional: false,
|
49
|
+
type: String),
|
50
|
+
FastlaneCore::ConfigItem.new(key: :app_id,
|
51
|
+
description: "Id of the app being built with the order file",
|
52
|
+
optional: false,
|
53
|
+
type: String),
|
54
|
+
FastlaneCore::ConfigItem.new(key: :output_path,
|
55
|
+
description: "Path to the order file",
|
56
|
+
optional: false,
|
57
|
+
type: String),
|
58
|
+
FastlaneCore::ConfigItem.new(key: :order_file_version,
|
59
|
+
description: "Version of the order file to download",
|
60
|
+
optional: false,
|
61
|
+
type: String),
|
62
|
+
]
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.is_supported?(platform)
|
66
|
+
platform == :ios
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-emerge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emerge Tools, Inc
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -150,8 +150,8 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 2.170.0
|
153
|
-
description:
|
154
|
-
email:
|
153
|
+
description:
|
154
|
+
email:
|
155
155
|
executables: []
|
156
156
|
extensions: []
|
157
157
|
extra_rdoc_files: []
|
@@ -161,13 +161,14 @@ files:
|
|
161
161
|
- lib/fastlane/plugin/emerge.rb
|
162
162
|
- lib/fastlane/plugin/emerge/actions/emerge_action.rb
|
163
163
|
- lib/fastlane/plugin/emerge/actions/emerge_comment_action.rb
|
164
|
+
- lib/fastlane/plugin/emerge/actions/emerge_order_file_action.rb
|
164
165
|
- lib/fastlane/plugin/emerge/helper/emerge_helper.rb
|
165
166
|
- lib/fastlane/plugin/emerge/version.rb
|
166
167
|
homepage: https://github.com/EmergeTools/fastlane-plugin-emerge
|
167
168
|
licenses:
|
168
169
|
- MIT
|
169
170
|
metadata: {}
|
170
|
-
post_install_message:
|
171
|
+
post_install_message:
|
171
172
|
rdoc_options: []
|
172
173
|
require_paths:
|
173
174
|
- lib
|
@@ -182,8 +183,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
183
|
- !ruby/object:Gem::Version
|
183
184
|
version: '0'
|
184
185
|
requirements: []
|
185
|
-
rubygems_version: 3.
|
186
|
-
signing_key:
|
186
|
+
rubygems_version: 3.2.3
|
187
|
+
signing_key:
|
187
188
|
specification_version: 4
|
188
189
|
summary: Fastlane plugin for Emerge
|
189
190
|
test_files: []
|