fastlane-plugin-appbox 4.0.1 → 4.1.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/README.md +67 -39
- data/lib/fastlane/plugin/appbox/actions/appbox_action.rb +87 -14
- data/lib/fastlane/plugin/appbox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8b5a7e445b61bdd1a1602f5ce2ed3cf4a3eb3daffc57effd64354b93d89ce839
|
|
4
|
+
data.tar.gz: 380259628a64cd15179cc53601a5d76fdc3de5dadfe258dfbf6a5e5aaecda80f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 966123b78cf91358b7872da8b713e89cd4ce56fccbf43734ab67a671356f73f8362a5e543089864b79ca26243bd1314ebb7e48241f71f381dc7fa9a237492c81
|
|
7
|
+
data.tar.gz: 0a7ca8d109b1526ea0a1bd0af326b93137cdb26fdccd2980f776d32ff0b2e7dbe91ec1ce4a80b0a2a5cf335138955f1517b4b2782668523e52ae3efd89e464a5
|
data/README.md
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
[](https://github.com/sponsors/vineetchoudhary)
|
|
2
|
+
[](https://buymeacoffee.com/vineetchoudhary)
|
|
3
|
+
[](https://github.com/getappbox/fastlane-plugin-appbox/actions/workflows/test.yml)
|
|
4
|
+
[](https://rubygems.org/gems/fastlane-plugin-appbox)
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
[](https://github.com/getappbox/fastlane-plugin-appbox/actions/workflows/test.yml)
|
|
6
|
+
# AppBox Plugin for Fastlane
|
|
5
7
|
|
|
6
8
|
## 1. Getting Started
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
### 1.1. Add appbox plugin to your project
|
|
11
|
+
This project is a [fastlane](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-appbox`, add it to your project by running:
|
|
9
12
|
|
|
10
13
|
```bash
|
|
11
14
|
fastlane add_plugin appbox
|
|
12
15
|
```
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
### 1.2. Install AppBox (if you haven't already)
|
|
18
|
+
Install AppBox using one of the following methods:
|
|
15
19
|
|
|
16
20
|
- **Direct Install:**
|
|
17
21
|
```bash
|
|
@@ -25,39 +29,36 @@ fastlane add_plugin appbox
|
|
|
25
29
|
|
|
26
30
|
Now, open AppBox and login with your Dropbox account.
|
|
27
31
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
**Step 3** - Define appbox action in your project Fastfile with emails and message. Here the available params for appbox plugins -
|
|
31
|
-
|
|
32
|
-
- `emails` (Optional | String) - Comma-separated list of email address that should receive application installation link.
|
|
33
|
-
- `message` (Optional | String) - A personal message shown under "Message from the developer" in the email, such as `'Here is the latest build.'`. Sent exactly as written — see [Using build details in the message](#using-build-details-in-the-message) to include the version or build number, or if you are moving off the AppBox 3 placeholders.
|
|
34
|
-
- `keep_same_link` (Optional | Bool) - This feature will keep same short URL for all future build/IPA uploaded with same bundle identifier. If this option is enabled, you can also download the previous build with the same URL. Read more [here](https://docs.getappbox.com/Features/keepsamelink/).
|
|
35
|
-
- `slack_webhook_url` (Optional | String) - Slack Incoming Webhook URL to post a notification to a Slack channel.
|
|
36
|
-
- `ms_teams_webhook_url` (Optional | String) - Microsoft Teams Incoming Webhook URL to post a notification to a Teams channel.
|
|
37
|
-
- `webhook_message` (Optional | String) - **Deprecated and ignored since AppBox 4**, which generates the notification text from the build itself. The plugin warns and drops it, so existing Fastfiles keep working unchanged.
|
|
38
|
-
- `dropbox_folder_name` (Optional | String) - You can change the link by providing a Custom Dropbox Folder Name. By default folder name will be the application bundle identifier. So, AppBox will keep the same link for the IPA file available in the same folder. Read more [here](https://docs.getappbox.com/Features/keepsamelink/).
|
|
32
|
+
### 1.3. Configure your Fastfile
|
|
39
33
|
|
|
40
|
-
|
|
34
|
+
Define appbox action in your project Fastfile with emails and message. Here the available params for appbox plugins -
|
|
41
35
|
|
|
42
|
-
|
|
36
|
+
| Parameter | Type | Description |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| `emails` | String (Optional) | Comma-separated list of email address that should receive application installation link. |
|
|
39
|
+
| `message` | String (Optional) | A personal message shown under "Message from the developer" in the email, such as `'Here is the latest build.'`. |
|
|
40
|
+
| `keep_same_link` | Bool (Optional) | This feature will keep same short URL for all future build/IPA uploaded with same bundle identifier. Read more [here](https://docs.getappbox.com/Features/keepsamelink/). |
|
|
41
|
+
| `slack_webhook_url` | String (Optional) | Slack Incoming Webhook URL to post a notification to a Slack channel. |
|
|
42
|
+
| `ms_teams_webhook_url` | String (Optional) | Microsoft Teams Incoming Webhook URL to post a notification to a Teams channel. |
|
|
43
|
+
| `webhook_message` | String (Optional) | **Deprecated and ignored since AppBox 4**, which generates the notification text from the build itself. |
|
|
44
|
+
| `dropbox_folder_name` | String (Optional) | You can change the link by providing a Custom Dropbox Folder Name. Read more [here](https://docs.getappbox.com/Features/keepsamelink/). |
|
|
45
|
+
| `more_details` | Bool (Optional) | Show the expanded build details on the install page: minimum iOS version, supported devices, build type, IPA size and provisioning profile. |
|
|
46
|
+
| `ipa_link` | Bool (Optional) | Show the direct IPA download link on the install page. |
|
|
47
|
+
| `previous_versions` | Bool (Optional) | Keep earlier builds listed on the install page. |
|
|
48
|
+
| `chunk_size` | Integer (Optional) | Dropbox upload chunk size in MB, from 1 to 150. |
|
|
43
49
|
|
|
44
|
-
|
|
45
|
-
message: "MyApp #{get_version_number}(#{get_build_number}) is ready to test.",
|
|
46
|
-
```
|
|
50
|
+
The four install-page settings (`more_details`, `ipa_link`, `previous_versions` and `chunk_size`) need AppBox 4.1.0 or later. Each one you leave unset falls back to the AppBox app's setting on the build machine, then to the built-in default: details on, IPA link off, previous versions on, 100 MB chunks. Set them in CI so every run uses the same install page, whatever the machine's AppBox is configured for. Each also reads an environment variable: `FL_APPBOX_MORE_DETAILS`, `FL_APPBOX_IPA_LINK`, `FL_APPBOX_PREVIOUS_VERSIONS` and `FL_APPBOX_CHUNK_SIZE`.
|
|
47
51
|
|
|
48
|
-
AppBox 3 used to do this for you by substituting `{BUILD_NAME}`, `{BUILD_VERSION}` and `{BUILD_NUMBER}`. AppBox 4 removed that substitution, so a message still containing them arrives with the braces intact. Replace them as follows:
|
|
49
52
|
|
|
50
|
-
|
|
51
|
-
| --- | --- |
|
|
52
|
-
| `{BUILD_NAME}` | your app or scheme name, or `#{File.basename(lane_context[SharedValues::IPA_OUTPUT_PATH], '.ipa')}` |
|
|
53
|
-
| `{BUILD_VERSION}` | `#{get_version_number}` |
|
|
54
|
-
| `{BUILD_NUMBER}` | `#{get_build_number}` |
|
|
55
|
-
| `{SHARE_URL}` | Nothing to do. It only applied to `webhook_message`, which AppBox 4 ignores and generates itself. |
|
|
53
|
+
## 2. Supported AppBox link access via Fastlane SharedValues
|
|
56
54
|
|
|
55
|
+
- `APPBOX_SHARE_URL` - AppBox short shareable URL to install uploaded application.
|
|
56
|
+
- `APPBOX_IPA_URL`- Upload IPA file URL to download IPA file.
|
|
57
|
+
- `APPBOX_MANIFEST_URL` - Manifest file URL for upload application.
|
|
57
58
|
|
|
58
|
-
##
|
|
59
|
+
## 3. Demo Fastfile with a lane `gymbox` with Different Options
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
### 3.1. Upload IPA file and Send an email to single email.
|
|
61
62
|
|
|
62
63
|
```rb
|
|
63
64
|
default_platform(:ios)
|
|
@@ -72,7 +73,7 @@ platform :ios do
|
|
|
72
73
|
end
|
|
73
74
|
```
|
|
74
75
|
|
|
75
|
-
|
|
76
|
+
### 3.2. Upload IPA file and Send email to multiple commas separated emails.
|
|
76
77
|
|
|
77
78
|
```rb
|
|
78
79
|
default_platform(:ios)
|
|
@@ -87,7 +88,7 @@ platform :ios do
|
|
|
87
88
|
end
|
|
88
89
|
```
|
|
89
90
|
|
|
90
|
-
|
|
91
|
+
### 3.3. Upload IPA file and Send email with a custom message.
|
|
91
92
|
|
|
92
93
|
```rb
|
|
93
94
|
default_platform(:ios)
|
|
@@ -103,7 +104,7 @@ platform :ios do
|
|
|
103
104
|
end
|
|
104
105
|
```
|
|
105
106
|
|
|
106
|
-
|
|
107
|
+
### 3.4. Upload IPA file and keep the same link for all future upload IPAs.
|
|
107
108
|
|
|
108
109
|
```rb
|
|
109
110
|
default_platform(:ios)
|
|
@@ -120,7 +121,7 @@ platform :ios do
|
|
|
120
121
|
end
|
|
121
122
|
```
|
|
122
123
|
|
|
123
|
-
|
|
124
|
+
### 3.5. Upload IPA file and keep the same link for all future upload IPAs in Custom Dropbox folder.
|
|
124
125
|
|
|
125
126
|
```rb
|
|
126
127
|
default_platform(:ios)
|
|
@@ -138,16 +139,30 @@ platform :ios do
|
|
|
138
139
|
end
|
|
139
140
|
```
|
|
140
141
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
### 3.6. Upload IPA file with fixed install page settings, for CI.
|
|
143
|
+
|
|
144
|
+
```rb
|
|
145
|
+
default_platform(:ios)
|
|
146
|
+
|
|
147
|
+
platform :ios do
|
|
148
|
+
lane :gymbox do
|
|
149
|
+
gym
|
|
150
|
+
appbox(
|
|
151
|
+
emails: 'you@example.com',
|
|
152
|
+
keep_same_link: true,
|
|
153
|
+
more_details: true,
|
|
154
|
+
ipa_link: false,
|
|
155
|
+
previous_versions: true,
|
|
156
|
+
chunk_size: 50,
|
|
157
|
+
)
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
```
|
|
145
161
|
|
|
146
162
|
## 4. About AppBox
|
|
147
163
|
[AppBox](https://getappbox.com) is a tool for iOS developers to build and deploy Development, Ad-Hoc and In-house (Enterprise) applications directly to the devices from your Dropbox account. Also, available on [Github](https://github.com/getappbox/AppBox-iOSAppsWirelessInstallation).
|
|
148
164
|
|
|
149
165
|
## 5. Example
|
|
150
|
-
|
|
151
166
|
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`.
|
|
152
167
|
|
|
153
168
|
## 6. Issues and Feedback
|
|
@@ -156,3 +171,16 @@ For any other issues and feedback about this plugin, please submit it to this [r
|
|
|
156
171
|
## 7. Troubleshooting
|
|
157
172
|
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
|
158
173
|
|
|
174
|
+
## 8. Support
|
|
175
|
+
If this plugin has been useful to you, consider supporting the continued development of AppBox.
|
|
176
|
+
|
|
177
|
+
<a href="https://github.com/sponsors/vineetchoudhary">
|
|
178
|
+
<img src="https://img.shields.io/badge/Sponsor%20on%20GitHub-EA4AAA?style=for-the-badge&logo=github&logoColor=white" alt="Sponsor on GitHub" height="50">
|
|
179
|
+
</a>
|
|
180
|
+
|
|
181
|
+
<a href="https://buymeacoffee.com/vineetchoudhary">
|
|
182
|
+
<img src="https://img.shields.io/badge/Buy%20me%20a%20coffee-FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black" alt="Buy Me a Coffee" height="50">
|
|
183
|
+
</a>
|
|
184
|
+
|
|
185
|
+
Thank you for supporting open source! 🙏
|
|
186
|
+
|
|
@@ -12,6 +12,17 @@ module Fastlane
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
class AppboxAction < Action
|
|
15
|
+
# Install-page toggles: option key, appboxcli flag, log label. Unset ones are
|
|
16
|
+
# left out so the CLI falls back to the AppBox app setting, then its default.
|
|
17
|
+
INSTALL_PAGE_TOGGLES = [
|
|
18
|
+
[:more_details, "moredetails", "More Details"],
|
|
19
|
+
[:ipa_link, "ipalink", "IPA Link"],
|
|
20
|
+
[:previous_versions, "previousversions", "Previous Versions"]
|
|
21
|
+
].freeze
|
|
22
|
+
|
|
23
|
+
# appboxcli's exit code when the build is live but the email could not be sent.
|
|
24
|
+
EMAIL_FAILED_EXIT_CODE = 111
|
|
25
|
+
|
|
15
26
|
def self.run(params)
|
|
16
27
|
# custom dropbox folder name
|
|
17
28
|
if params[:dropbox_folder_name]
|
|
@@ -76,31 +87,66 @@ module Fastlane
|
|
|
76
87
|
UI.important("webhook_message is deprecated and ignored since AppBox 4 - the notification text is generated from the build.")
|
|
77
88
|
end
|
|
78
89
|
|
|
90
|
+
page_args = install_page_args(params)
|
|
91
|
+
args += page_args
|
|
92
|
+
|
|
79
93
|
UI.message("AppBox Command - #{Shellwords.join(args)}")
|
|
80
94
|
|
|
81
|
-
|
|
82
|
-
exit_status = system(*args)
|
|
95
|
+
exit_code = run_cli(args)
|
|
83
96
|
|
|
84
97
|
# Print upload status
|
|
85
|
-
if
|
|
98
|
+
if [0, EMAIL_FAILED_EXIT_CODE].include?(exit_code)
|
|
86
99
|
UI.success("Successfully uploaded the IPA file to DropBox. Check below summary for more details.")
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
Actions.lane_context[SharedValues::APPBOX_IPA_URL] = share_urls_values['APPBOX_IPA_URL']
|
|
93
|
-
Actions.lane_context[SharedValues::APPBOX_SHARE_URL] = share_urls_values['APPBOX_SHARE_URL']
|
|
94
|
-
Actions.lane_context[SharedValues::APPBOX_MANIFEST_URL] = share_urls_values['APPBOX_MANIFEST_URL']
|
|
95
|
-
FastlaneCore::PrintTable.print_values(config: share_urls_values, hide_keys: [], title: "Summary for AppBox")
|
|
100
|
+
export_share_values
|
|
101
|
+
if exit_code == EMAIL_FAILED_EXIT_CODE
|
|
102
|
+
UI.error("The build is live, but AppBox couldn't send the email to #{params[:emails]}. Share APPBOX_SHARE_URL from the summary above with your testers.")
|
|
103
|
+
else
|
|
104
|
+
UI.success('AppBox finished successfully')
|
|
96
105
|
end
|
|
97
|
-
UI.success('AppBox finished successfully')
|
|
98
106
|
else
|
|
99
107
|
UI.error('AppBox finished with errors')
|
|
108
|
+
unless page_args.empty?
|
|
109
|
+
UI.important("more_details, ipa_link, previous_versions and chunk_size need AppBox 4.1.0 or later. If the CLI reported an unknown option, update AppBox.")
|
|
110
|
+
end
|
|
100
111
|
UI.user_error!('AppBox upload failed. Please feel free to open an issue on the project GitHub page, including a description of what is not working. https://github.com/getappbox/fastlane-plugin-appbox/issues/new')
|
|
101
112
|
end
|
|
102
113
|
end
|
|
103
114
|
|
|
115
|
+
# Runs appboxcli without a shell and returns its exit code.
|
|
116
|
+
def self.run_cli(args)
|
|
117
|
+
system(*args)
|
|
118
|
+
$?.exitstatus
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def self.export_share_values
|
|
122
|
+
share_url_file_path = File.join(File.expand_path('~'), ".appbox_share_value.json")
|
|
123
|
+
return unless File.file?(share_url_file_path)
|
|
124
|
+
|
|
125
|
+
share_urls_values = JSON.parse(File.read(share_url_file_path))
|
|
126
|
+
Actions.lane_context[SharedValues::APPBOX_IPA_URL] = share_urls_values['APPBOX_IPA_URL']
|
|
127
|
+
Actions.lane_context[SharedValues::APPBOX_SHARE_URL] = share_urls_values['APPBOX_SHARE_URL']
|
|
128
|
+
Actions.lane_context[SharedValues::APPBOX_MANIFEST_URL] = share_urls_values['APPBOX_MANIFEST_URL']
|
|
129
|
+
FastlaneCore::PrintTable.print_values(config: share_urls_values, hide_keys: [], title: "Summary for AppBox")
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
def self.install_page_args(params)
|
|
133
|
+
args = []
|
|
134
|
+
|
|
135
|
+
INSTALL_PAGE_TOGGLES.each do |key, flag, label|
|
|
136
|
+
next if params[key].nil?
|
|
137
|
+
|
|
138
|
+
args << (params[key] ? "--#{flag}" : "--no-#{flag}")
|
|
139
|
+
UI.message("#{label} - #{params[key]}")
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if params[:chunk_size]
|
|
143
|
+
args += ["--chunksize", params[:chunk_size].to_s]
|
|
144
|
+
UI.message("Chunk Size - #{params[:chunk_size]} MB")
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
args
|
|
148
|
+
end
|
|
149
|
+
|
|
104
150
|
def self.output
|
|
105
151
|
[
|
|
106
152
|
['APPBOX_IPA_URL', 'Upload IPA file URL to download IPA file.'],
|
|
@@ -158,7 +204,34 @@ module Fastlane
|
|
|
158
204
|
FastlaneCore::ConfigItem.new(key: :webhook_message,
|
|
159
205
|
env_name: "FL_APPBOX_WEBHOOK_MESSAGE",
|
|
160
206
|
description: "Deprecated and ignored since AppBox 4, which generates the notification text from the build. Accepted, with a warning, so existing Fastfiles keep working",
|
|
161
|
-
optional: true)
|
|
207
|
+
optional: true),
|
|
208
|
+
|
|
209
|
+
FastlaneCore::ConfigItem.new(key: :more_details,
|
|
210
|
+
env_name: "FL_APPBOX_MORE_DETAILS",
|
|
211
|
+
description: "Show the expanded build details on the install page (minimum iOS version, supported devices, build type, IPA size and provisioning profile). Unset uses the AppBox app setting, then on. Requires AppBox 4.1.0 or later",
|
|
212
|
+
optional: true,
|
|
213
|
+
type: Fastlane::Boolean),
|
|
214
|
+
|
|
215
|
+
FastlaneCore::ConfigItem.new(key: :ipa_link,
|
|
216
|
+
env_name: "FL_APPBOX_IPA_LINK",
|
|
217
|
+
description: "Show the direct IPA download link on the install page. Unset uses the AppBox app setting, then off. Requires AppBox 4.1.0 or later",
|
|
218
|
+
optional: true,
|
|
219
|
+
type: Fastlane::Boolean),
|
|
220
|
+
|
|
221
|
+
FastlaneCore::ConfigItem.new(key: :previous_versions,
|
|
222
|
+
env_name: "FL_APPBOX_PREVIOUS_VERSIONS",
|
|
223
|
+
description: "Keep earlier builds listed on the install page. Unset uses the AppBox app setting, then on. Requires AppBox 4.1.0 or later",
|
|
224
|
+
optional: true,
|
|
225
|
+
type: Fastlane::Boolean),
|
|
226
|
+
|
|
227
|
+
FastlaneCore::ConfigItem.new(key: :chunk_size,
|
|
228
|
+
env_name: "FL_APPBOX_CHUNK_SIZE",
|
|
229
|
+
description: "Dropbox upload chunk size in MB, from 1 to 150. Unset uses the AppBox app setting, then 100. Requires AppBox 4.1.0 or later",
|
|
230
|
+
optional: true,
|
|
231
|
+
type: Integer,
|
|
232
|
+
verify_block: proc do |value|
|
|
233
|
+
UI.user_error!("chunk_size must be between 1 and 150 MB, got #{value}") unless (1..150).cover?(value)
|
|
234
|
+
end)
|
|
162
235
|
]
|
|
163
236
|
end
|
|
164
237
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastlane-plugin-appbox
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0
|
|
4
|
+
version: 4.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vineet Choudhary
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pry
|