fastlane-plugin-lambdatest 0.1.3 → 0.1.5
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: f9cd7ca178c79331ec23fa7e000a64945577cb9a899e11ee0e48266c671b5afe
|
4
|
+
data.tar.gz: dcb3040feafc253227d43da92ea3476db117805c3b90c4c0356a991fb5f2f164
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe58dcb0ca287018563a692ae5581a4200dc871a916bfdc608df1904dcfe68796a5f96177b1d440b1ce8104ea59086649bd7830ec34f2f574d6f369ff090bc02
|
7
|
+
data.tar.gz: bf519cba62ed920c4d0157e97f44625f055f3890c6d9cdb9cca738cd762e0435494a512b926f16a84b6b99b77cf265294a659bf8fc0290ba5d90c6acd38b33b7
|
data/README.md
CHANGED
@@ -22,15 +22,18 @@ upload_to_lambdatest(
|
|
22
22
|
file_path: "app_file_path"
|
23
23
|
)
|
24
24
|
```
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
25
|
+
|
26
|
+
### Options
|
27
|
+
|
28
|
+
| Option | Description | Required | Default Value |
|
29
|
+
|---------------------|------------------------------------|----------|----------------
|
30
|
+
| `lt_username` | LambdaTest username (from ENV) | ✅ Yes | N/A |
|
31
|
+
| `lt_access_key` | LambdaTest access key (from ENV) | ✅ Yes | N/A |
|
32
|
+
| `file_path` | Path to the app file | ✅ Yes | N/A |
|
33
|
+
| `app_name` | App Name | ❌ No | "app" |
|
34
|
+
| `visibility` | Visibility | ❌ No | "individual" |
|
35
|
+
| `is_real_device` | Real Device or Virual Device | ❌ No | true |
|
36
|
+
|
34
37
|
|
35
38
|
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`.
|
36
39
|
|
@@ -9,7 +9,6 @@ module Fastlane
|
|
9
9
|
end
|
10
10
|
class UploadToLambdatestAction < Action
|
11
11
|
|
12
|
-
API_ENDPOINT = "https://manual-api.lambdatest.com/app/upload/realDevice"
|
13
12
|
SUPPORTED_EXTENSIONS = ["apk", "ipa", "aab"]
|
14
13
|
|
15
14
|
def self.run(params)
|
@@ -17,12 +16,17 @@ module Fastlane
|
|
17
16
|
lt_access_key = params[:lt_access_key] # Required
|
18
17
|
file_path = params[:file_path].to_s # Required
|
19
18
|
custom_id = params[:custom_id] # Optional
|
19
|
+
app_name = params[:app_name] #Optional
|
20
|
+
visibility = params[:visibility] #Optional
|
21
|
+
is_real_device = params[:is_real_device] #Optional
|
20
22
|
|
21
|
-
|
23
|
+
api_endpoint = self.get_api_endpoint(is_real_device)
|
24
|
+
|
25
|
+
self.validate_file_path(file_path)
|
22
26
|
|
23
27
|
UI.message("Started Uploading app to Lambdatest...")
|
24
28
|
|
25
|
-
lt_app_url = Helper::LambdatestHelper.upload_file(lt_username, lt_access_key, file_path,
|
29
|
+
lt_app_url = Helper::LambdatestHelper.upload_file(lt_username, lt_access_key, file_path, api_endpoint, custom_id, app_name, visibility)
|
26
30
|
|
27
31
|
# Set 'APP_URL' environment variable, if app upload was successful.
|
28
32
|
ENV['APP_URL'] = lt_app_url
|
@@ -36,6 +40,14 @@ module Fastlane
|
|
36
40
|
Actions.lane_context[SharedValues::APP_URL] = lt_app_url
|
37
41
|
end
|
38
42
|
|
43
|
+
def self.get_api_endpoint(is_real_device)
|
44
|
+
if is_real_device
|
45
|
+
"https://manual-api.lambdatest.com/app/upload/realDevice"
|
46
|
+
else
|
47
|
+
"https://manual-api.lambdatest.com/app/upload/virtualDevice"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
39
51
|
# Validating file_path and extension.
|
40
52
|
def self.validate_file_path(file_path)
|
41
53
|
UI.user_error!("file not found at '#{file_path}' ❌ .") unless File.exist?(file_path)
|
@@ -85,14 +97,31 @@ module Fastlane
|
|
85
97
|
UI.user_error!("No lt_access_key given.") if value.to_s.empty?
|
86
98
|
end),
|
87
99
|
FastlaneCore::ConfigItem.new(key: :file_path,
|
88
|
-
description: "
|
100
|
+
description: "App file path",
|
89
101
|
optional: true,
|
90
102
|
is_string: true,
|
91
103
|
default_value: default_file_path),
|
92
104
|
FastlaneCore::ConfigItem.new(key: :custom_id,
|
93
105
|
description: "Custom ID",
|
94
106
|
optional: true,
|
95
|
-
is_string: false
|
107
|
+
is_string: false,
|
108
|
+
default_value: nil),
|
109
|
+
FastlaneCore::ConfigItem.new(key: :app_name,
|
110
|
+
description: "App name",
|
111
|
+
optional: true,
|
112
|
+
is_string: true,
|
113
|
+
default_value: "app"),
|
114
|
+
FastlaneCore::ConfigItem.new(key: :visibility,
|
115
|
+
description: "Visibility",
|
116
|
+
optional: true,
|
117
|
+
is_string: true,
|
118
|
+
default_value: "individual"),
|
119
|
+
FastlaneCore::ConfigItem.new(key: :is_real_device,
|
120
|
+
description: "Real Device or Virtual Device",
|
121
|
+
optional: true,
|
122
|
+
is_string: false,
|
123
|
+
default_value: true,
|
124
|
+
type: Boolean)
|
96
125
|
]
|
97
126
|
end
|
98
127
|
|
@@ -112,7 +141,16 @@ module Fastlane
|
|
112
141
|
'upload_to_lambdatest(
|
113
142
|
lt_username: ENV["LT_USERNAME"],
|
114
143
|
lt_access_key: ENV["LT_ACCESS_KEY"],
|
115
|
-
file_path: "path_to_app_file"
|
144
|
+
file_path: "path_to_app_file",
|
145
|
+
app_name: "android_app"
|
146
|
+
)',
|
147
|
+
'upload_to_lambdatest(
|
148
|
+
lt_username: ENV["LT_USERNAME"],
|
149
|
+
lt_access_key: ENV["LT_ACCESS_KEY"],
|
150
|
+
file_path: "path_to_app_file",
|
151
|
+
app_name: "android_app",
|
152
|
+
visibility: "team",
|
153
|
+
is_real_device: true
|
116
154
|
)'
|
117
155
|
]
|
118
156
|
end
|
@@ -20,10 +20,11 @@ module Fastlane
|
|
20
20
|
# +custom_id+:: Custom id for app upload.
|
21
21
|
# +file_path+:: Path to the file to be uploaded.
|
22
22
|
# +url+:: Lambdatest's app upload endpoint.
|
23
|
-
def self.upload_file(lt_username, lt_access_key, file_path, url, custom_id
|
23
|
+
def self.upload_file(lt_username, lt_access_key, file_path, url, custom_id,app_name, visibility)
|
24
24
|
payload = {
|
25
|
-
name:
|
26
|
-
appFile: File.new(file_path, 'rb')
|
25
|
+
name: app_name,
|
26
|
+
appFile: File.new(file_path, 'rb'),
|
27
|
+
visibility: visibility
|
27
28
|
}
|
28
29
|
|
29
30
|
unless custom_id.nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-lambdatest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LambdaTest
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -156,7 +156,7 @@ dependencies:
|
|
156
156
|
- - ">="
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: 2.96.1
|
159
|
-
description:
|
159
|
+
description:
|
160
160
|
email: support@lambdatest.com
|
161
161
|
executables: []
|
162
162
|
extensions: []
|
@@ -172,7 +172,7 @@ homepage: https://github.com/LambdaTest/lambdatest-fastlane-plugin
|
|
172
172
|
licenses:
|
173
173
|
- MIT
|
174
174
|
metadata: {}
|
175
|
-
post_install_message:
|
175
|
+
post_install_message:
|
176
176
|
rdoc_options: []
|
177
177
|
require_paths:
|
178
178
|
- lib
|
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
188
|
version: '0'
|
189
189
|
requirements: []
|
190
190
|
rubygems_version: 3.1.2
|
191
|
-
signing_key:
|
191
|
+
signing_key:
|
192
192
|
specification_version: 4
|
193
193
|
summary: fastlane plugin to upload app to lambdatest
|
194
194
|
test_files: []
|