fastlane-plugin-emerge 0.3.3 → 0.4.0
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 47c07cc0fbda1c835f0ae0f3b1719aea68de191a28d614d4d2552835a611c90c
|
|
4
|
+
data.tar.gz: 13b5463f6997f22e1ed988929b3a3a7c40913ee6f91725a7bef0dbafd2cc03fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 37f44ee6483d12df8a2e0a7493f3955cce64852aa0aad5465a3036c9c3deb7784c2e171359ccebe2d249e0911c542cfa05ff96ef246228ea18afe965b63cc251
|
|
7
|
+
data.tar.gz: fd22b473450105e6e8e736f4f5d4db31fbcb3b71c64ace912f99b7b929f26d18fad1230cff744461afcdf52e8c36c501ca79388329c8dc4fd512dd8dfdf69122
|
|
@@ -3,6 +3,7 @@ require 'fastlane_core/print_table'
|
|
|
3
3
|
require_relative '../helper/emerge_helper'
|
|
4
4
|
require 'pathname'
|
|
5
5
|
require 'tmpdir'
|
|
6
|
+
require 'json'
|
|
6
7
|
require 'fileutils'
|
|
7
8
|
|
|
8
9
|
module Fastlane
|
|
@@ -16,13 +17,14 @@ module Fastlane
|
|
|
16
17
|
file_path = Dir.glob("#{lane_context[SharedValues::SCAN_DERIVED_DATA_PATH]}/Build/Products/Debug-iphonesimulator/*.app").first
|
|
17
18
|
end
|
|
18
19
|
pr_number = params[:pr_number]
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
branch = params[:branch]
|
|
21
|
+
sha = params[:sha] || params[:build_id]
|
|
22
|
+
base_sha = params[:base_sha] || params[:base_build_id]
|
|
21
23
|
repo_name = params[:repo_name]
|
|
22
24
|
gitlab_project_id = params[:gitlab_project_id]
|
|
23
25
|
build_type = params[:build_type]
|
|
24
26
|
|
|
25
|
-
if !File.exist?(file_path)
|
|
27
|
+
if file_path == nil || !File.exist?(file_path)
|
|
26
28
|
UI.error("Invalid input file")
|
|
27
29
|
return
|
|
28
30
|
end
|
|
@@ -61,19 +63,22 @@ module Fastlane
|
|
|
61
63
|
return
|
|
62
64
|
end
|
|
63
65
|
|
|
64
|
-
|
|
65
|
-
url = 'https://api.emergetools.com/
|
|
66
|
+
filename = File.basename(file_path)
|
|
67
|
+
url = 'https://api.emergetools.com/upload'
|
|
66
68
|
params = {
|
|
67
|
-
|
|
69
|
+
filename: filename,
|
|
68
70
|
}
|
|
69
71
|
if pr_number
|
|
70
72
|
params[:prNumber] = pr_number
|
|
71
73
|
end
|
|
72
|
-
if
|
|
73
|
-
params[:
|
|
74
|
+
if branch
|
|
75
|
+
params[:branch] = branch
|
|
74
76
|
end
|
|
75
|
-
if
|
|
76
|
-
params[:
|
|
77
|
+
if sha
|
|
78
|
+
params[:sha] = sha
|
|
79
|
+
end
|
|
80
|
+
if base_sha
|
|
81
|
+
params[:baseSha] = base_sha
|
|
77
82
|
end
|
|
78
83
|
if repo_name
|
|
79
84
|
params[:repoName] = repo_name
|
|
@@ -86,7 +91,7 @@ module Fastlane
|
|
|
86
91
|
config: params,
|
|
87
92
|
hide_keys: [],
|
|
88
93
|
title: "Summary for Emerge #{Fastlane::Emerge::VERSION}")
|
|
89
|
-
resp = Faraday.
|
|
94
|
+
resp = Faraday.post(url, params.to_json, {'Content-Type' => 'application/json', 'X-API-Token' => api_token})
|
|
90
95
|
case resp.status
|
|
91
96
|
when 200
|
|
92
97
|
json = JSON.parse(resp.body)
|
|
@@ -144,12 +149,26 @@ module Fastlane
|
|
|
144
149
|
description: "The PR number that triggered this upload",
|
|
145
150
|
optional: true,
|
|
146
151
|
type: String),
|
|
152
|
+
FastlaneCore::ConfigItem.new(key: :branch,
|
|
153
|
+
description: "The current git branch",
|
|
154
|
+
optional: true,
|
|
155
|
+
type: String),
|
|
156
|
+
FastlaneCore::ConfigItem.new(key: :sha,
|
|
157
|
+
description: "The git SHA that triggered this build",
|
|
158
|
+
optional: true,
|
|
159
|
+
type: String),
|
|
160
|
+
FastlaneCore::ConfigItem.new(key: :base_sha,
|
|
161
|
+
description: "The git SHA of the base build. This parameter does not need to be set if you’re using the Github integration",
|
|
162
|
+
optional: true,
|
|
163
|
+
type: String),
|
|
147
164
|
FastlaneCore::ConfigItem.new(key: :build_id,
|
|
148
165
|
description: "A string to identify this build",
|
|
166
|
+
deprecated: "Replaced by `sha`",
|
|
149
167
|
optional: true,
|
|
150
168
|
type: String),
|
|
151
169
|
FastlaneCore::ConfigItem.new(key: :base_build_id,
|
|
152
170
|
description: "Id of the build to compare with this upload",
|
|
171
|
+
deprecated: "Replaced by `base_sha`",
|
|
153
172
|
optional: true,
|
|
154
173
|
type: String),
|
|
155
174
|
FastlaneCore::ConfigItem.new(key: :repo_name,
|
|
@@ -161,7 +180,7 @@ module Fastlane
|
|
|
161
180
|
optional: true,
|
|
162
181
|
type: Integer),
|
|
163
182
|
FastlaneCore::ConfigItem.new(key: :build_type,
|
|
164
|
-
description: "
|
|
183
|
+
description: "String to identify the type of build such as release/development. Used to filter size graphs. Defaults to development",
|
|
165
184
|
optional: true,
|
|
166
185
|
type: String)
|
|
167
186
|
]
|
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.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Emerge Tools, Inc
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-09-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|