fastlane-plugin-pcloudy 0.2.1 → 0.3.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 +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +21 -5
- data/lib/fastlane/plugin/pcloudy/actions/pcloudy_resign_app_action.rb +2 -2
- data/lib/fastlane/plugin/pcloudy/actions/pcloudy_upload_app_action.rb +16 -11
- data/lib/fastlane/plugin/pcloudy/helper/pcloudy_options.rb +9 -0
- data/lib/fastlane/plugin/pcloudy/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7943aa34838d8ab7194a838a3d1ea68b2dabcc289cd7114f5a02db2473cce783
|
|
4
|
+
data.tar.gz: a3e9a85568b6e84c20413b8e3a084b9cbe1059d1e903eefa096bd2996d406b07
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 40f9ccc7e9b532d9421c56288264db84c318c49d3bffdfa5a5028ab485816104d4a7e77c56e87055a3074a2105b39e617cc0ad7c05d8f16ed67a607aec3474fd
|
|
7
|
+
data.tar.gz: 9f2b9b43ead83dc81f8e6d4585f5f326584f89ac9c84cfa46e3e2a33fb3aaec4a1ca63c7e56b5bb116220f168f50676dcc5374281f9474eff1ec1887ef7341ba
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
- `pcloudy_upload_app` and `pcloudy_resign_app` now also set `PCLOUDY_UPLOADED_FILE`, `PCLOUDY_RESIGNED_FILE`
|
|
6
|
+
and `PCLOUDY_APP_FILE` as environment variables, so Appium test runners started with `sh` can read
|
|
7
|
+
`PCLOUDY_APP_FILE` directly.
|
|
8
|
+
- A new upload without `resign` clears `PCLOUDY_RESIGNED_FILE`, so it never points at an earlier app.
|
|
9
|
+
- `pcloudy_upload_app` accepts Android App Bundles (`.aab`) and uses the `.aab` from `gradle` bundle tasks
|
|
10
|
+
when no `.ipa` or `.apk` was built.
|
|
11
|
+
|
|
3
12
|
## 0.2.1
|
|
4
13
|
|
|
5
14
|
- Network failures such as timeouts, dropped connections during large uploads, and unreachable hosts
|
data/README.md
CHANGED
|
@@ -5,7 +5,7 @@ A [fastlane](https://fastlane.tools) plugin for [pCloudy](https://www.pcloudy.co
|
|
|
5
5
|
| Action | Status |
|
|
6
6
|
|---|---|
|
|
7
7
|
| `pcloudy_list_devices`: list available devices | ✅ Available |
|
|
8
|
-
| `pcloudy_upload_app`: upload an `.ipa` / `.apk` | ✅ Available |
|
|
8
|
+
| `pcloudy_upload_app`: upload an `.ipa` / `.apk` / `.aab` | ✅ Available |
|
|
9
9
|
| `pcloudy_resign_app`: re-sign an `.ipa` for pCloudy devices | ✅ Available |
|
|
10
10
|
| `pcloudy_book_device` / `pcloudy_release_device` | Planned |
|
|
11
11
|
| `pcloudy_install_app`: install and launch on a booked device | Planned |
|
|
@@ -46,9 +46,25 @@ end
|
|
|
46
46
|
|
|
47
47
|
The app then appears in **pCloudy → My Apps**, ready to install on real devices.
|
|
48
48
|
|
|
49
|
+
## Running Appium tests after the upload
|
|
50
|
+
|
|
51
|
+
The upload and re-sign actions set `PCLOUDY_APP_FILE` as an environment variable, so a test runner started with `sh` can read it directly:
|
|
52
|
+
|
|
53
|
+
```ruby
|
|
54
|
+
lane :pcloudy_appium do
|
|
55
|
+
build_app(scheme: "MyApp", export_method: "development")
|
|
56
|
+
pcloudy_upload_app(resign: true) # sets ENV["PCLOUDY_APP_FILE"]
|
|
57
|
+
sh("cd .. && mvn test") # or pytest, npm test, ...
|
|
58
|
+
end
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```java
|
|
62
|
+
caps.setCapability("pCloudy_ApplicationName", System.getenv("PCLOUDY_APP_FILE"));
|
|
63
|
+
```
|
|
64
|
+
|
|
49
65
|
## `pcloudy_upload_app`
|
|
50
66
|
|
|
51
|
-
Uploads an `.ipa` or `.
|
|
67
|
+
Uploads an `.ipa`, `.apk` or `.aab` to pCloudy My Apps. If you don't pass `file:`, it uses the `.ipa` from `build_app`, or else the `.apk` from `gradle` (`assemble…` tasks), or else the `.aab` from `gradle` (`bundle…` tasks).
|
|
52
68
|
|
|
53
69
|
When a file with the same name already exists, pCloudy saves the upload under a new, timestamped name (e.g. `MyApp-1794551836.ipa`). The action returns that name, so always use the return value or `PCLOUDY_UPLOADED_FILE`, never the local file name.
|
|
54
70
|
|
|
@@ -60,7 +76,7 @@ name = pcloudy_upload_app(file: "./build/MyApp.apk")
|
|
|
60
76
|
|
|
61
77
|
| Option | Env var | Default | Description |
|
|
62
78
|
|---|---|---|---|
|
|
63
|
-
| `file` | `PCLOUDY_APP_PATH` | output of `build_app` / `gradle` | Path to the `.ipa` or `.
|
|
79
|
+
| `file` | `PCLOUDY_APP_PATH` | output of `build_app` / `gradle` | Path to the `.ipa`, `.apk` or `.aab` |
|
|
64
80
|
| `resign` | `PCLOUDY_RESIGN` | `false` | Re-sign the `.ipa` after uploading (iOS only) |
|
|
65
81
|
| `wait_for_processing` | `PCLOUDY_WAIT_FOR_PROCESSING` | `true` | Wait until the file appears in My Apps |
|
|
66
82
|
| `upload_timeout` | `PCLOUDY_UPLOAD_TIMEOUT` | `600` | Seconds allowed for the upload |
|
|
@@ -71,7 +87,7 @@ name = pcloudy_upload_app(file: "./build/MyApp.apk")
|
|
|
71
87
|
Plus `username`, `api_key` and `cloud_url`, as for every action.
|
|
72
88
|
|
|
73
89
|
**Returns:** the file name in My Apps (the re-signed copy when `resign: true`).
|
|
74
|
-
**Sets
|
|
90
|
+
**Sets** (in `lane_context` and as environment variables): `PCLOUDY_UPLOADED_FILE`, `PCLOUDY_APP_FILE`, and with `resign: true`, `PCLOUDY_RESIGNED_FILE`. A new upload without `resign` clears `PCLOUDY_RESIGNED_FILE`.
|
|
75
91
|
|
|
76
92
|
## `pcloudy_resign_app`
|
|
77
93
|
|
|
@@ -91,7 +107,7 @@ pcloudy_resign_app(file: "MyApp-1794551836.ipa") # a file already in My Apps
|
|
|
91
107
|
| `poll_interval` | — | `5` | Seconds between progress checks |
|
|
92
108
|
|
|
93
109
|
**Returns:** the re-signed file name, e.g. `MyApp-1794551836_Resigned1794551854668.ipa`.
|
|
94
|
-
**Sets
|
|
110
|
+
**Sets** (in `lane_context` and as environment variables): `PCLOUDY_RESIGNED_FILE` and `PCLOUDY_APP_FILE`.
|
|
95
111
|
|
|
96
112
|
## `pcloudy_list_devices`
|
|
97
113
|
|
|
@@ -12,8 +12,8 @@ module Fastlane
|
|
|
12
12
|
client = Helper::PcloudyOptions.client(params)
|
|
13
13
|
signed = Helper::PcloudyOptions.resign(client, filename, timeout: params[:timeout], interval: params[:poll_interval])
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
Helper::PcloudyOptions.export(SharedValues::PCLOUDY_RESIGNED_FILE, signed)
|
|
16
|
+
Helper::PcloudyOptions.export(SharedValues::PCLOUDY_APP_FILE, signed)
|
|
17
17
|
signed
|
|
18
18
|
rescue Helper::PcloudyClient::Error => e
|
|
19
19
|
UI.user_error!(e.message)
|
|
@@ -10,7 +10,7 @@ module Fastlane
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
class PcloudyUploadAppAction < Action
|
|
13
|
-
EXTENSIONS = %w(.ipa .apk).freeze
|
|
13
|
+
EXTENSIONS = %w(.ipa .apk .aab).freeze
|
|
14
14
|
|
|
15
15
|
def self.run(params)
|
|
16
16
|
path = params[:file] || default_file
|
|
@@ -19,7 +19,7 @@ module Fastlane
|
|
|
19
19
|
path = File.expand_path(path)
|
|
20
20
|
UI.user_error!("File not found: #{path}") unless File.file?(path)
|
|
21
21
|
ext = File.extname(path).downcase
|
|
22
|
-
UI.user_error!("Unsupported file type '#{ext}'. pCloudy apps must be #{EXTENSIONS.join('
|
|
22
|
+
UI.user_error!("Unsupported file type '#{ext}'. pCloudy apps must be #{EXTENSIONS.join(', ')}") unless EXTENSIONS.include?(ext)
|
|
23
23
|
UI.user_error!("resign: true only works for iOS apps (.ipa); #{File.basename(path)} is #{ext}") if params[:resign] && ext != ".ipa"
|
|
24
24
|
|
|
25
25
|
client = Helper::PcloudyOptions.client(params)
|
|
@@ -33,13 +33,15 @@ module Fastlane
|
|
|
33
33
|
client.wait_for_file(name, timeout: params[:processing_timeout])
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
Helper::PcloudyOptions.export(SharedValues::PCLOUDY_UPLOADED_FILE, name)
|
|
37
|
+
Helper::PcloudyOptions.export(SharedValues::PCLOUDY_APP_FILE, name)
|
|
38
|
+
# Don't leave a re-signed name from an earlier upload in this lane pointing at a different app.
|
|
39
|
+
Helper::PcloudyOptions.export(SharedValues::PCLOUDY_RESIGNED_FILE, nil)
|
|
38
40
|
|
|
39
41
|
if params[:resign]
|
|
40
42
|
name = Helper::PcloudyOptions.resign(client, name, timeout: params[:resign_timeout], interval: params[:poll_interval])
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
Helper::PcloudyOptions.export(SharedValues::PCLOUDY_RESIGNED_FILE, name)
|
|
44
|
+
Helper::PcloudyOptions.export(SharedValues::PCLOUDY_APP_FILE, name)
|
|
43
45
|
end
|
|
44
46
|
|
|
45
47
|
name
|
|
@@ -47,10 +49,11 @@ module Fastlane
|
|
|
47
49
|
UI.user_error!(e.message)
|
|
48
50
|
end
|
|
49
51
|
|
|
50
|
-
# The .ipa from build_app/gym,
|
|
52
|
+
# The .ipa from build_app/gym, else the .apk from gradle, else the .aab from gradle (bundle tasks).
|
|
51
53
|
def self.default_file
|
|
52
54
|
context = Actions.lane_context
|
|
53
|
-
[context[:IPA_OUTPUT_PATH], context[:GRADLE_APK_OUTPUT_PATH]]
|
|
55
|
+
[context[:IPA_OUTPUT_PATH], context[:GRADLE_APK_OUTPUT_PATH], context[:GRADLE_AAB_OUTPUT_PATH]]
|
|
56
|
+
.find { |value| !value.to_s.empty? }
|
|
54
57
|
end
|
|
55
58
|
|
|
56
59
|
def self.format_size(bytes)
|
|
@@ -62,13 +65,15 @@ module Fastlane
|
|
|
62
65
|
#####################################################
|
|
63
66
|
|
|
64
67
|
def self.description
|
|
65
|
-
"Uploads an .ipa or .
|
|
68
|
+
"Uploads an .ipa, .apk or .aab to pCloudy (My Apps), optionally re-signing the .ipa"
|
|
66
69
|
end
|
|
67
70
|
|
|
68
71
|
def self.details
|
|
69
72
|
"Uploads the app built by build_app or gradle (or any file you pass) to pCloudy, waits until pCloudy has " \
|
|
70
73
|
"registered it, and returns the name pCloudy stored it under. pCloudy adds a timestamp to the name when " \
|
|
71
|
-
"a file with the same name already exists, so always use the returned name or
|
|
74
|
+
"a file with the same name already exists, so always use the returned name or PCLOUDY_APP_FILE. " \
|
|
75
|
+
"The names are also set as environment variables, so test scripts started with sh can read " \
|
|
76
|
+
"PCLOUDY_APP_FILE directly."
|
|
72
77
|
end
|
|
73
78
|
|
|
74
79
|
def self.authors
|
|
@@ -91,7 +96,7 @@ module Fastlane
|
|
|
91
96
|
Helper::PcloudyOptions.auth + [
|
|
92
97
|
FastlaneCore::ConfigItem.new(key: :file,
|
|
93
98
|
env_name: "PCLOUDY_APP_PATH",
|
|
94
|
-
description: "Path to the .ipa or .
|
|
99
|
+
description: "Path to the .ipa, .apk or .aab. Defaults to the output of build_app or gradle",
|
|
95
100
|
optional: true,
|
|
96
101
|
type: String),
|
|
97
102
|
FastlaneCore::ConfigItem.new(key: :resign,
|
|
@@ -27,6 +27,15 @@ module Fastlane
|
|
|
27
27
|
]
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
# Stores a result in lane_context and in ENV under the same name, so lanes can read
|
|
31
|
+
# lane_context[SharedValues::PCLOUDY_APP_FILE] and test scripts started with sh(...)
|
|
32
|
+
# can read the environment variable PCLOUDY_APP_FILE without any extra wiring.
|
|
33
|
+
# A nil value clears both.
|
|
34
|
+
def self.export(key, value)
|
|
35
|
+
Actions.lane_context[key] = value
|
|
36
|
+
value.nil? ? ENV.delete(key.to_s) : ENV[key.to_s] = value.to_s
|
|
37
|
+
end
|
|
38
|
+
|
|
30
39
|
def self.client(params)
|
|
31
40
|
PcloudyClient.new(username: params[:username],
|
|
32
41
|
api_key: params[:api_key],
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastlane-plugin-pcloudy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- pCloudy
|
|
@@ -72,8 +72,8 @@ dependencies:
|
|
|
72
72
|
- !ruby/object:Gem::Version
|
|
73
73
|
version: '3.0'
|
|
74
74
|
description: 'Use pCloudy (device.pcloudy.com or a private cloud) from your fastlane
|
|
75
|
-
lanes: list available real iOS and Android devices, upload the .ipa or .
|
|
76
|
-
just built, and re-sign iOS apps with pCloudy''s certificate.'
|
|
75
|
+
lanes: list available real iOS and Android devices, upload the .ipa, .apk or .aab
|
|
76
|
+
you just built, and re-sign iOS apps with pCloudy''s certificate.'
|
|
77
77
|
executables: []
|
|
78
78
|
extensions: []
|
|
79
79
|
extra_rdoc_files: []
|