fastlane-plugin-paper_tools_builds 0.1.0 → 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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9bf5e0f0808b2892b64ef89058aae10e528d2f1354ab657f395e5d9bd386c90a
|
|
4
|
+
data.tar.gz: bf0ff556454cbc93257cb33d40b85c8f0f4a09ab0f2dd7483b45b1860db78d8f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c065acc5befcbc8fd5352bd7dc2965e3c5044c06ca20d58e45d5c1441f514012d2770fa837aab06bb96cd1621041c9ade83b99b78f052037fd6bb8c9560b5b16
|
|
7
|
+
data.tar.gz: 5c2f833fc0d5a7c84c0dcb22c296fd60b5f475458f53edb44e549751e2222416bd5978ac942ddc4bf3efb8e53784c6298bf2afc40035efc13e4b605a9984a747
|
data/README.md
CHANGED
|
@@ -29,8 +29,11 @@ lane :distribute do
|
|
|
29
29
|
|
|
30
30
|
build_id = paper_tools_builds_upload(
|
|
31
31
|
file: lane_context[SharedValues::IPA_OUTPUT_PATH],
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
org: "your-org-id",
|
|
33
|
+
app: "your-app-id",
|
|
34
|
+
token: ENV["BUILDS_TOKEN"],
|
|
35
|
+
to: "cto@acme.com",
|
|
36
|
+
lists: "qa",
|
|
34
37
|
version: get_version_number,
|
|
35
38
|
build_number: get_build_number
|
|
36
39
|
)
|
|
@@ -39,29 +42,35 @@ lane :distribute do
|
|
|
39
42
|
end
|
|
40
43
|
```
|
|
41
44
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
is also on
|
|
45
|
+
Pass `org`, `app`, and `token` at the call site — the plugin no longer reads them
|
|
46
|
+
from the environment for you. The token still never belongs in a Fastfile, so
|
|
47
|
+
read it from a CI secret as above. The build id the action returns is also on
|
|
48
|
+
`lane_context[SharedValues::PAPER_TOOLS_BUILDS_BUILD_ID]`.
|
|
49
|
+
|
|
50
|
+
Distribution is per-build. `to` names recipient emails and `lists` names
|
|
51
|
+
distribution lists; a build with neither is uploaded but not handed to anyone.
|
|
52
|
+
There are no channels — an upload that used `channel:` now sets `to:` or `lists:`
|
|
53
|
+
instead.
|
|
45
54
|
|
|
46
55
|
## Options
|
|
47
56
|
|
|
48
|
-
| Option |
|
|
49
|
-
| --------------- |
|
|
50
|
-
| `file` |
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `org` |
|
|
55
|
-
| `app` |
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `format` |
|
|
62
|
-
| `notify` |
|
|
63
|
-
| `concurrency` |
|
|
64
|
-
| `binary` |
|
|
57
|
+
| Option | Description |
|
|
58
|
+
| --------------- | ---------------------------------------------- |
|
|
59
|
+
| `file` | Path to the `.ipa`, `.apk`, or `.aab`. Required. |
|
|
60
|
+
| `token` | A `builds:write` token. Required. |
|
|
61
|
+
| `to` | Comma-separated recipient emails to distribute to. |
|
|
62
|
+
| `lists` | Comma-separated distribution list names to distribute to. |
|
|
63
|
+
| `org` | The organisation id. Required. |
|
|
64
|
+
| `app` | The app id. Required. |
|
|
65
|
+
| `version` | The marketing version. |
|
|
66
|
+
| `build_number` | The build number. |
|
|
67
|
+
| `release_notes` | Release notes. |
|
|
68
|
+
| `tags` | Comma-separated tags. |
|
|
69
|
+
| `expires_in` | Seconds until the distribution expires. |
|
|
70
|
+
| `format` | Force the format when the extension is unclear. |
|
|
71
|
+
| `notify` | Notify recipients of the distribution. |
|
|
72
|
+
| `concurrency` | Parallel part uploads. |
|
|
73
|
+
| `binary` | Path to the `builds` binary. Defaults to `builds`. |
|
|
65
74
|
|
|
66
75
|
## A non-zero exit fails the lane
|
|
67
76
|
|
|
@@ -12,30 +12,28 @@ module Fastlane
|
|
|
12
12
|
#
|
|
13
13
|
# The binary is the single upload path, so the lane inherits its resumable
|
|
14
14
|
# multipart upload, its exit codes, and its staging-or-production default
|
|
15
|
-
# without reimplementing any of it.
|
|
16
|
-
# never in the argument list, so it stays out of a process listing and a log.
|
|
15
|
+
# without reimplementing any of it.
|
|
17
16
|
class PaperToolsBuildsUploadAction < Action
|
|
18
17
|
def self.run(params)
|
|
19
|
-
command = [params[:binary], 'upload', params[:file], '--
|
|
18
|
+
command = [params[:binary], 'upload', params[:file], '--json']
|
|
20
19
|
command += ['--to', params[:to]] unless params[:to].nil?
|
|
20
|
+
command += ['--lists', params[:lists]] unless params[:lists].nil?
|
|
21
21
|
command += ['--version', params[:version]] unless params[:version].nil?
|
|
22
22
|
command += ['--build-number', params[:build_number].to_s] unless params[:build_number].nil?
|
|
23
23
|
command += ['--release-notes', params[:release_notes]] unless params[:release_notes].nil?
|
|
24
24
|
command += ['--tags', params[:tags]] unless params[:tags].nil?
|
|
25
|
+
command += ['--expires-in', params[:expires_in].to_s] unless params[:expires_in].nil?
|
|
25
26
|
command += ['--format', params[:format]] unless params[:format].nil?
|
|
26
27
|
command += ['--concurrency', params[:concurrency].to_s] unless params[:concurrency].nil?
|
|
27
|
-
command += ['--org', params[:org]
|
|
28
|
-
command += ['--app', params[:app]] unless params[:app].nil?
|
|
29
|
-
command += ['--api-url', params[:api_url]] unless params[:api_url].nil?
|
|
28
|
+
command += ['--org', params[:org], '--app', params[:app]]
|
|
30
29
|
command += (params[:notify] ? ['--notify'] : ['--no-notify']) unless params[:notify].nil?
|
|
31
30
|
|
|
32
|
-
# The token
|
|
33
|
-
#
|
|
34
|
-
|
|
35
|
-
env['BUILDS_TOKEN'] = params[:token] unless params[:token].nil?
|
|
31
|
+
# The token is a `--token` flag the caller passes in, not a variable the
|
|
32
|
+
# plugin reads from the environment behind the caller's back.
|
|
33
|
+
command += ['--token', params[:token]]
|
|
36
34
|
|
|
37
|
-
UI.message("Uploading #{params[:file]}
|
|
38
|
-
stdout, stderr, status = Open3.capture3(
|
|
35
|
+
UI.message("Uploading #{params[:file]}…")
|
|
36
|
+
stdout, stderr, status = Open3.capture3(*command)
|
|
39
37
|
|
|
40
38
|
unless status.success?
|
|
41
39
|
UI.error(stderr.strip) unless stderr.strip.empty?
|
|
@@ -66,8 +64,7 @@ module Fastlane
|
|
|
66
64
|
|
|
67
65
|
def self.details
|
|
68
66
|
'Wraps the `builds` CLI. Install it first (brew install ' \
|
|
69
|
-
'paper-tools/tap/builds), then
|
|
70
|
-
'BUILDS_TOKEN or pass it as `token`.'
|
|
67
|
+
'paper-tools/tap/builds), then pass a builds:write token as `token`.'
|
|
71
68
|
end
|
|
72
69
|
|
|
73
70
|
def self.return_value
|
|
@@ -82,34 +79,23 @@ module Fastlane
|
|
|
82
79
|
def self.available_options
|
|
83
80
|
[
|
|
84
81
|
FastlaneCore::ConfigItem.new(key: :file,
|
|
85
|
-
env_name: 'BUILDS_FILE',
|
|
86
82
|
description: 'Path to the .ipa, .apk, or .aab',
|
|
87
83
|
verify_block: proc do |value|
|
|
88
84
|
UI.user_error!("No file at #{value}") unless File.exist?(value)
|
|
89
85
|
end),
|
|
90
|
-
FastlaneCore::ConfigItem.new(key: :channel,
|
|
91
|
-
env_name: 'BUILDS_CHANNEL',
|
|
92
|
-
description: 'The channel to land on'),
|
|
93
86
|
FastlaneCore::ConfigItem.new(key: :token,
|
|
94
|
-
env_name: 'BUILDS_TOKEN',
|
|
95
87
|
description: 'A builds:write API token',
|
|
96
|
-
sensitive: true,
|
|
97
|
-
optional: true),
|
|
88
|
+
sensitive: true),
|
|
98
89
|
FastlaneCore::ConfigItem.new(key: :to,
|
|
99
|
-
description: 'Comma-separated
|
|
90
|
+
description: 'Comma-separated recipient emails to distribute to',
|
|
100
91
|
optional: true),
|
|
101
|
-
FastlaneCore::ConfigItem.new(key: :
|
|
102
|
-
|
|
103
|
-
description: 'The organisation id',
|
|
92
|
+
FastlaneCore::ConfigItem.new(key: :lists,
|
|
93
|
+
description: 'Comma-separated distribution list names to distribute to',
|
|
104
94
|
optional: true),
|
|
95
|
+
FastlaneCore::ConfigItem.new(key: :org,
|
|
96
|
+
description: 'The organisation id'),
|
|
105
97
|
FastlaneCore::ConfigItem.new(key: :app,
|
|
106
|
-
|
|
107
|
-
description: 'The app id',
|
|
108
|
-
optional: true),
|
|
109
|
-
FastlaneCore::ConfigItem.new(key: :api_url,
|
|
110
|
-
env_name: 'BUILDS_API_URL',
|
|
111
|
-
description: 'Override the binary\'s built-in API host',
|
|
112
|
-
optional: true),
|
|
98
|
+
description: 'The app id'),
|
|
113
99
|
FastlaneCore::ConfigItem.new(key: :version,
|
|
114
100
|
description: 'The marketing version',
|
|
115
101
|
optional: true),
|
|
@@ -125,8 +111,12 @@ module Fastlane
|
|
|
125
111
|
FastlaneCore::ConfigItem.new(key: :format,
|
|
126
112
|
description: 'Force the format when the extension does not name it',
|
|
127
113
|
optional: true),
|
|
114
|
+
FastlaneCore::ConfigItem.new(key: :expires_in,
|
|
115
|
+
description: 'Seconds until the distribution expires',
|
|
116
|
+
optional: true,
|
|
117
|
+
type: Integer),
|
|
128
118
|
FastlaneCore::ConfigItem.new(key: :notify,
|
|
129
|
-
description: 'Notify recipients
|
|
119
|
+
description: 'Notify recipients of the distribution',
|
|
130
120
|
optional: true,
|
|
131
121
|
is_string: false),
|
|
132
122
|
FastlaneCore::ConfigItem.new(key: :concurrency,
|
|
@@ -152,7 +142,11 @@ module Fastlane
|
|
|
152
142
|
[
|
|
153
143
|
'paper_tools_builds_upload(
|
|
154
144
|
file: lane_context[SharedValues::IPA_OUTPUT_PATH],
|
|
155
|
-
|
|
145
|
+
org: "your-org-id",
|
|
146
|
+
app: "your-app-id",
|
|
147
|
+
token: ENV["BUILDS_TOKEN"],
|
|
148
|
+
to: "cto@acme.com",
|
|
149
|
+
lists: "qa",
|
|
156
150
|
version: get_version_number,
|
|
157
151
|
build_number: get_build_number
|
|
158
152
|
)',
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastlane-plugin-paper_tools_builds
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- paper.tools
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-08-
|
|
11
|
+
date: 2026-08-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: fastlane
|