fastlane-plugin-paper_tools_builds 0.1.0 → 0.2.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: 908c8abf1c1c43649aec2095b46ef05c1536dd1ce4702494eb2654510ef4142e
4
- data.tar.gz: 556964951b566ef27f528f0be710ddd67b893b5e6d35ce61e356915c9f3c8b8d
3
+ metadata.gz: 00367a8178507c2050db5b42dc353a26c9b6b8bb3063f3e65ac3aa41f2356dc4
4
+ data.tar.gz: f9b77b5f48a1b7c025f1cac969349dd47dc1d077aef7a3644936e06cb3fb8d17
5
5
  SHA512:
6
- metadata.gz: bd9e42c757e48cb02ab14fb76bb7f2bed0a6ebde6e0b2852ee8fc977b5d1c0611ae20c611091b3deff8ecf8716c33ac7c8410b69a34bf70e25c76f4da639a7ec
7
- data.tar.gz: 50e08177846dcb5a096138fc86e38f473d779bcd0b26116628a0c39046010663cd608c1fd3a5d33428f421c07bebc78976ae8335711ed9df597f812fefa9faa0
6
+ metadata.gz: 50d3ea8cb0572015ed17299fef8f526bb2a54408f659c1bd0aceb74a78133683e437bee969e03936ec146c220fbfdb6d0355beb8071342398c32c5732bb380e3
7
+ data.tar.gz: 5325cd36984897ab2318cc0673e322258580a3bdb592ebac6e10d6b14e6568327d89bbfb543ed8910140c4fddba4096a2548c70493b88d662afb935b1ef81ef2
data/README.md CHANGED
@@ -30,6 +30,9 @@ lane :distribute do
30
30
  build_id = paper_tools_builds_upload(
31
31
  file: lane_context[SharedValues::IPA_OUTPUT_PATH],
32
32
  channel: "qa",
33
+ org: "your-org-id",
34
+ app: "your-app-id",
35
+ token: ENV["BUILDS_TOKEN"],
33
36
  to: "qa,cto@acme.com",
34
37
  version: get_version_number,
35
38
  build_number: get_build_number
@@ -39,29 +42,29 @@ lane :distribute do
39
42
  end
40
43
  ```
41
44
 
42
- Set `BUILDS_TOKEN`, `BUILDS_ORG`, and `BUILDS_APP` in the environment — the token
43
- never belongs in a Fastfile. The action reads them, and the build id it returns
44
- is also on `lane_context[SharedValues::PAPER_TOOLS_BUILDS_BUILD_ID]`.
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]`.
45
49
 
46
50
  ## Options
47
51
 
48
- | Option | Env | Description |
49
- | --------------- | -------------- | ---------------------------------------------- |
50
- | `file` | `BUILDS_FILE` | Path to the `.ipa`, `.apk`, or `.aab`. Required. |
51
- | `channel` | `BUILDS_CHANNEL` | The channel to land on. Required. |
52
- | `token` | `BUILDS_TOKEN` | A `builds:write` token. Kept out of argv. |
53
- | `to` | | Comma-separated recipients. |
54
- | `org` | `BUILDS_ORG` | The organisation id. |
55
- | `app` | `BUILDS_APP` | The app id. |
56
- | `api_url` | `BUILDS_API_URL` | Override the binary's built-in host. |
57
- | `version` | | The marketing version. |
58
- | `build_number` | | The build number. |
59
- | `release_notes` | | Release notes. |
60
- | `tags` | | Comma-separated tags. |
61
- | `format` | | Force the format when the extension is unclear. |
62
- | `notify` | | Notify recipients. |
63
- | `concurrency` | | Parallel part uploads. |
64
- | `binary` | | Path to the `builds` binary. Defaults to `builds`. |
52
+ | Option | Description |
53
+ | --------------- | ---------------------------------------------- |
54
+ | `file` | Path to the `.ipa`, `.apk`, or `.aab`. Required. |
55
+ | `channel` | The channel to land on. Required. |
56
+ | `token` | A `builds:write` token. Required. |
57
+ | `to` | Comma-separated recipients. |
58
+ | `org` | The organisation id. Required. |
59
+ | `app` | The app id. Required. |
60
+ | `version` | The marketing version. |
61
+ | `build_number` | The build number. |
62
+ | `release_notes` | Release notes. |
63
+ | `tags` | Comma-separated tags. |
64
+ | `format` | Force the format when the extension is unclear. |
65
+ | `notify` | Notify recipients. |
66
+ | `concurrency` | Parallel part uploads. |
67
+ | `binary` | Path to the `builds` binary. Defaults to `builds`. |
65
68
 
66
69
  ## A non-zero exit fails the lane
67
70
 
@@ -12,8 +12,7 @@ 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. The token travels in the environment,
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
18
  command = [params[:binary], 'upload', params[:file], '--channel', params[:channel], '--json']
@@ -24,18 +23,15 @@ module Fastlane
24
23
  command += ['--tags', params[:tags]] unless params[:tags].nil?
25
24
  command += ['--format', params[:format]] unless params[:format].nil?
26
25
  command += ['--concurrency', params[:concurrency].to_s] unless params[:concurrency].nil?
27
- command += ['--org', params[:org]] unless params[:org].nil?
28
- command += ['--app', params[:app]] unless params[:app].nil?
29
- command += ['--api-url', params[:api_url]] unless params[:api_url].nil?
26
+ command += ['--org', params[:org], '--app', params[:app]]
30
27
  command += (params[:notify] ? ['--notify'] : ['--no-notify']) unless params[:notify].nil?
31
28
 
32
- # The token goes in the environment, not the command, so it never lands
33
- # in argv. `builds` reads BUILDS_TOKEN there.
34
- env = {}
35
- env['BUILDS_TOKEN'] = params[:token] unless params[:token].nil?
29
+ # The token is a `--token` flag the caller passes in, not a variable the
30
+ # plugin reads from the environment behind the caller's back.
31
+ command += ['--token', params[:token]]
36
32
 
37
33
  UI.message("Uploading #{params[:file]} to channel #{params[:channel]}…")
38
- stdout, stderr, status = Open3.capture3(env, *command)
34
+ stdout, stderr, status = Open3.capture3(*command)
39
35
 
40
36
  unless status.success?
41
37
  UI.error(stderr.strip) unless stderr.strip.empty?
@@ -66,8 +62,7 @@ module Fastlane
66
62
 
67
63
  def self.details
68
64
  'Wraps the `builds` CLI. Install it first (brew install ' \
69
- 'paper-tools/tap/builds), then set a builds:write token in ' \
70
- 'BUILDS_TOKEN or pass it as `token`.'
65
+ 'paper-tools/tap/builds), then pass a builds:write token as `token`.'
71
66
  end
72
67
 
73
68
  def self.return_value
@@ -82,34 +77,22 @@ module Fastlane
82
77
  def self.available_options
83
78
  [
84
79
  FastlaneCore::ConfigItem.new(key: :file,
85
- env_name: 'BUILDS_FILE',
86
80
  description: 'Path to the .ipa, .apk, or .aab',
87
81
  verify_block: proc do |value|
88
82
  UI.user_error!("No file at #{value}") unless File.exist?(value)
89
83
  end),
90
84
  FastlaneCore::ConfigItem.new(key: :channel,
91
- env_name: 'BUILDS_CHANNEL',
92
85
  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
90
  description: 'Comma-separated recipients to distribute to',
100
91
  optional: true),
101
92
  FastlaneCore::ConfigItem.new(key: :org,
102
- env_name: 'BUILDS_ORG',
103
- description: 'The organisation id',
104
- optional: true),
93
+ description: 'The organisation id'),
105
94
  FastlaneCore::ConfigItem.new(key: :app,
106
- env_name: 'BUILDS_APP',
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),
95
+ description: 'The app id'),
113
96
  FastlaneCore::ConfigItem.new(key: :version,
114
97
  description: 'The marketing version',
115
98
  optional: true),
@@ -153,6 +136,9 @@ module Fastlane
153
136
  'paper_tools_builds_upload(
154
137
  file: lane_context[SharedValues::IPA_OUTPUT_PATH],
155
138
  channel: "qa",
139
+ org: "your-org-id",
140
+ app: "your-app-id",
141
+ token: ENV["BUILDS_TOKEN"],
156
142
  version: get_version_number,
157
143
  build_number: get_build_number
158
144
  )',
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module PaperToolsBuilds
3
- VERSION = '0.1.0'
3
+ VERSION = '0.2.0'
4
4
  end
5
5
  end
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.1.0
4
+ version: 0.2.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-21 00:00:00.000000000 Z
11
+ date: 2026-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane