kettle-dev 2.4.5 → 2.5.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: 33050e9b303264a6fe036799b05426b026a3d5a46479d03dde14c4ce324f6a6e
4
- data.tar.gz: 88cba7649c5199a955ebb83a13b1d9ba7a3942739beb7fb1468e8e889cee21d4
3
+ metadata.gz: 4e95f076500c09ae192037d1590706647ad90595ae3d3d463cd95bfed5d4ad61
4
+ data.tar.gz: 2fa51594f020d3aee2013d627522e0ae78244f950eef9ea8c1e3841477baf150
5
5
  SHA512:
6
- metadata.gz: 45485e2fab41bdf3ea56e9633356262da6ee839db6cdfd85d895f7a9adb6b75d59308ba64d1b20d08199a07e26e9ebda9c4eaa69eaa498407b8458e372816a9b
7
- data.tar.gz: c1023667792f6eedbf3a0f246c57e9096ef0c33e09e9ac612190593a2bf4dcb5c55edd759f9db197f34f3bd773f5d1cd62a62e1e49e3e5765b6cc230cd83ddc5
6
+ metadata.gz: 773c04657cf36d34c0e0be8f848fc398ac204ada102dd8c9aa6315bef274bea4b511d6a569d94b351e58da56b3664576ffe5a955e6a1e30d45c3f00da21cc0cc
7
+ data.tar.gz: 64fe35b2414b53dbf8fd35248d40e1d6cb5ebefd2c1923dd7d06c419f06248a850801ff882728da6d99b59581221bb889fe0838284a8893e32520be36e911ca5
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,147 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [2.5.0] - 2026-07-26
34
+
35
+ - TAG: [v2.5.0][2.5.0t]
36
+ - COVERAGE: 91.71% -- 4589/5004 lines in 42 files
37
+ - BRANCH COVERAGE: 75.98% -- 1743/2294 branches in 42 files
38
+ - 56.21% documented
39
+
40
+ ### Added
41
+
42
+ - `kettle-release` can now use `--secrets-provider 1password` to load the gem
43
+ signing passphrase and RubyGems MFA OTP from the local 1Password CLI during
44
+ direct release runs.
45
+ - `kettle-release` and `kettle-changelog` now accept `--yes` to approve their
46
+ release confirmation prompts without interactive input.
47
+
48
+ - `kettle-reset Gemfile.lock` now resets CI-facing lockfiles by disabling local
49
+ sibling path environments and updating path-sourced or checksum-gap gems back
50
+ to released registry versions with checksums.
51
+ - `kettle-reset Appraisal.root.gemfile.lock` and
52
+ `kettle-reset release-lockfiles` now cover the appraisal root lockfile used by
53
+ release and appraisal generation.
54
+
55
+ - kettle-jem-template-20260727-001 - Spec harness documentation now lists the
56
+ RSpec helpers provided by `kettle-test`.
57
+
58
+ ### Changed
59
+
60
+ - Documented family release credential automation with 1Password and the
61
+ unreleased-family-gem cleanup workflow.
62
+ - Shared release secret provider code now lives in `kettle-dev`, allowing
63
+ `kettle-family` to cache the signing passphrase once while child
64
+ `kettle-release` processes fetch RubyGems OTP values at prompt time.
65
+
66
+ - `kettle-release` now skips the default task's duplicate test and coverage run
67
+ when `kettle-changelog` already generated strict coverage in the same release.
68
+ - `kettle-changelog` now requests JSON-only coverage output for release metadata
69
+ generation, reducing formatter noise during release preparation.
70
+
71
+ ### Fixed
72
+
73
+ - `kettle-release --secrets-provider 1password` now validates the gem signing
74
+ passphrase before build/release and aborts instead of prompting if configured
75
+ secrets are unavailable.
76
+
77
+ - Direct `kettle-release --secrets-provider 1password` runs now use the same
78
+ PTY-backed prompt bridge as family releases, so PEM passphrase prompts receive
79
+ the configured provider value instead of leaking through interactively.
80
+
81
+ - `kettle-release --secrets-provider 1password` now recognizes the real
82
+ 1Password provider as configured instead of misclassifying it as the
83
+ interactive fallback provider.
84
+
85
+ - Release secrets provider lookup now honors `provider` from explicit config,
86
+ and direct provider lookup failures raise `Kettle::Dev::Error`.
87
+
88
+ - kettle-jem-template-20260726-003 - Coverage upload steps now treat Coveralls,
89
+ QLTY, and Codecov as optional, so provider outages do not fail CI when local
90
+ coverage thresholds still pass.
91
+
92
+ - `kettle-release` now uses the same lockfile reset logic before release prep
93
+ commits, and can reset and amend release lockfiles before the first push if
94
+ local paths reappear mid-release.
95
+ - Release lockfile validation now allows the current gem's own `gemspec` path
96
+ source while still rejecting local sibling path sources.
97
+ - Release version checks now use RubyGems.org directly, while post-publish
98
+ availability probes continue to verify the gem.coop Bundler source.
99
+ - Release lockfile reset now uninstalls unreleased locally installed workspace
100
+ gem versions before regenerating `Gemfile.lock` and
101
+ `Appraisal.root.gemfile.lock`, preventing local-only versions from being
102
+ written as registry gems with checksums.
103
+
104
+ - Release and changelog specs now route git commit, amend, tag, reset, and
105
+ release-state queries through `GitAdapter`, so test runs do not invoke the
106
+ caller's real git signing configuration.
107
+
108
+ - `kettle-release` no longer loads the extracted `cgi` gem while booting, so
109
+ Ruby 2.4 appraisals can run release executable smoke tests without hitting
110
+ newer `cgi` code that requires `String#delete_prefix`.
111
+ - `kettle-release` now reports the exact lockfile diagnostics that trigger its
112
+ pre-push reset attempt, amends the release prep commit only when tracked
113
+ lockfiles changed, and reports unrepaired diagnostics before aborting.
114
+ - Release lockfile validation no longer treats the current gem's own
115
+ `remote: .` lockfile source as a local sibling path when line endings or
116
+ whitespace differ.
117
+
118
+ - Release lockfile validation now uses `Bundler::LockfileParser` for source
119
+ classification, so registry remotes such as `https://gem.coop/` are not
120
+ mistaken for local path sources.
121
+
122
+ - Release lockfile fallback output now distinguishes between amending the release
123
+ prep commit and restoring uncommitted lockfile drift back to that commit.
124
+
125
+ ## [2.4.6] - 2026-07-26
126
+
127
+ - TAG: [v2.4.6][2.4.6t]
128
+ - COVERAGE: 92.57% -- 4135/4467 lines in 38 files
129
+ - BRANCH COVERAGE: 76.58% -- 1612/2105 branches in 38 files
130
+ - 59.47% documented
131
+
132
+ ### Added
133
+
134
+ - kettle-jem-template-20260726-001 - Projects now include YARD lint
135
+ configuration and documentation dependencies so documentation issues fail
136
+ before generated docs are refreshed.
137
+
138
+ ### Changed
139
+
140
+ - Executable startup headers are now shown only when `--verbose` is passed;
141
+ `-v` and `--version` still print just the executable version and exit.
142
+ - `yard:lint` now runs `yard-lint --quiet` first and only reruns with full
143
+ output when lint fails, keeping warning-only default and release output
144
+ compact while preserving failure diagnostics.
145
+ - `yard:lint` now runs before `yard` and before the default task reaches YARD
146
+ documentation generation, so documentation lint failures fail earlier in CI.
147
+
148
+ - kettle-jem-template-20260725-002 - Version specs now use `anonymous_loader` to
149
+ cover `version.rb` without redefining constants, or are removed when version
150
+ specs are not managed for the project.
151
+
152
+ ### Fixed
153
+
154
+ - `yard.rake` specs now account for appraisal bundles without documentation
155
+ dependencies, so current-appraisal CI does not expect `yard:lint` when YARD
156
+ is unavailable.
157
+ - Executable version specs now ignore RubyGems platform redefinition warnings
158
+ from appraisal bundles while still failing on real executable stderr.
159
+ - `kettle-release` lockfile normalization now passes `--add-checksums` when it
160
+ repairs release lockfiles, so empty CHECKSUMS entries are not left behind for
161
+ the pre-commit validation pass.
162
+ - `kettle-release` lockfile normalization now passes `BUNDLE_LOCKFILE`, so
163
+ appraisal root lockfiles are repaired in place instead of accidentally
164
+ rewriting `Gemfile.lock`.
165
+ - `kettle-dvcs` documentation examples no longer use Ruby-only YARD example
166
+ tags for shell commands, so `yard:lint` can pass before docs are regenerated.
167
+ - `kettle-changelog` now reports `bin/rake yard` failures directly, including
168
+ `yard:lint` output, instead of misreporting them as missing documentation
169
+ percentages.
170
+
171
+ - kettle-jem-template-20260726-002 - Generated version files now document their
172
+ version namespace and constants, reducing warning-only YARD lint output.
173
+
33
174
  ## [2.4.5] - 2026-07-25
34
175
 
35
176
  - TAG: [v2.4.5][2.4.5t]
@@ -2739,7 +2880,11 @@ Please file a bug if you notice a violation of semantic versioning.
2739
2880
  - Selecting will run the selected workflow via `act`
2740
2881
  - This may move to its own gem in the future.
2741
2882
 
2742
- [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.4.5...HEAD
2883
+ [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.5.0...HEAD
2884
+ [2.5.0]: https://github.com/kettle-dev/kettle-dev/compare/v2.4.6...v2.5.0
2885
+ [2.5.0t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.5.0
2886
+ [2.4.6]: https://github.com/kettle-dev/kettle-dev/compare/v2.4.5...v2.4.6
2887
+ [2.4.6t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.4.6
2743
2888
  [2.4.5]: https://github.com/kettle-dev/kettle-dev/compare/v2.4.4...v2.4.5
2744
2889
  [2.4.5t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.4.5
2745
2890
  [2.4.4]: https://github.com/kettle-dev/kettle-dev/compare/v2.4.3...v2.4.4
data/README.md CHANGED
@@ -72,6 +72,10 @@ bin/kettle-changelog
72
72
  bin/kettle-release
73
73
  ```
74
74
 
75
+ Family-wide releases are coordinated by the separate
76
+ [kettle-family](https://github.com/kettle-dev/kettle-family) gem, which shells
77
+ out to `kettle-release` for each member that needs publishing.
78
+
75
79
  ### What kettle-dev provides
76
80
 
77
81
  - Rake task loading from `require "kettle/dev"`.
@@ -291,6 +295,22 @@ Releasing and signing
291
295
  - `SKIP_GEM_SIGNING`: If set, skip gem signing during build/release
292
296
  - `GEM_CERT_USER`: Username for selecting your public cert in `certs/<USER>.pem` (defaults to $USER)
293
297
  - `SOURCE_DATE_EPOCH`: Reproducible build timestamp. `kettle-release` will set this automatically for the session.
298
+ - `KETTLE_RELEASE_SECRETS_PROVIDER`: Release secrets provider for direct
299
+ `kettle-release` runs. Supported values are `interactive` and `1password`.
300
+ - `KETTLE_RELEASE_1PASSWORD_ITEM`: 1Password item for release secrets
301
+ (default: `Rubygems`).
302
+ - `KETTLE_RELEASE_1PASSWORD_GEM_SIGNING_PASSPHRASE_FIELD`: 1Password field for
303
+ the gem signing passphrase (default: `GEM-SIGN-PASSPHRASE`).
304
+ - `KETTLE_RELEASE_1PASSWORD_RUBYGEMS_OTP_FIELD`: 1Password OTP field for
305
+ RubyGems MFA (default: `one-time password`).
306
+ - `KETTLE_RELEASE_1PASSWORD_ACCOUNT`: Optional 1Password account selector.
307
+ - `KETTLE_RELEASE_1PASSWORD_GEM_SIGNING_PASSPHRASE_REFERENCE` and
308
+ `KETTLE_RELEASE_1PASSWORD_RUBYGEMS_OTP_REFERENCE`: Optional explicit
309
+ `op://` references.
310
+
311
+ Family releases can load signing and RubyGems MFA secrets from 1Password via
312
+ `kettle-family` configuration instead of environment variables. See the
313
+ maintainer release section below.
294
314
 
295
315
  Git hooks and commit message helpers (exe/kettle-commit-msg)
296
316
 
@@ -425,10 +445,104 @@ What it does:
425
445
  - After intermittent CI failure, restart from monitoring: `bundle exec kettle-release start_step=10`
426
446
  - After fixing a failed pre-release gate, rerun from step 0: `bundle exec kettle-release`
427
447
  - After intentionally handling a failed pre-release gate, skip it and start numbered release steps: `bundle exec kettle-release start_step=1`
448
+ - Auto-approve release confirmation prompts: `bundle exec kettle-release --yes`
449
+ - Run direct release with 1Password secrets: `bundle exec kettle-release --secrets-provider 1password`
450
+ - Lockfile recovery:
451
+ - Script: `exe/kettle-reset` (run as `kettle-reset`)
452
+ - Reset a CI-facing lockfile after local development has written sibling
453
+ paths or checksum-less local gem versions: `bundle exec kettle-reset Gemfile.lock`
454
+ - Reset both release-facing lockfiles together:
455
+ `bundle exec kettle-reset release-lockfiles`
456
+ - Reset the appraisal root lockfile directly:
457
+ `bundle exec kettle-reset Appraisal.root.gemfile.lock`
458
+ - Validate without changing the lockfile: `bundle exec kettle-reset --check Gemfile.lock`
459
+ - `kettle-reset` disables path-like `*_DEV` and `*_LOCAL` environment
460
+ variables, known local-template toggles, and writes checksums while
461
+ updating path-sourced and checksum-gap gems back to released registry
462
+ versions.
463
+ - During `kettle-release`, release lockfiles are reset before the release
464
+ prep commit. Before pushing, `kettle-release` validates those committed
465
+ lockfiles again; if local paths or checksum gaps reappear, it prints the
466
+ diagnostics, attempts one reset, amends the release prep commit if the
467
+ reset changed tracked lockfiles, and aborts if diagnostics remain.
428
468
  - Tips:
429
469
  - The commit message helper `exe/kettle-commit-msg` prefers project-local `.git-hooks` (then falls back to `~/.git-hooks`).
430
470
  - The goalie file `commit-subjects-goalie.txt` controls when a footer is appended; customize `footer-template.erb.txt` as you like.
431
471
 
472
+ Direct `kettle-release` runs can opt in to 1Password for the gem signing
473
+ passphrase and RubyGems MFA OTP:
474
+
475
+ ```console
476
+ bundle exec kettle-release --secrets-provider 1password
477
+ ```
478
+
479
+ The default 1Password lookup uses item `Rubygems`, field
480
+ `GEM-SIGN-PASSPHRASE` for the signing key passphrase, and the item's OTP for
481
+ RubyGems MFA. Override those values with the `KETTLE_RELEASE_1PASSWORD_*`
482
+ environment variables above. `kettle-release` fetches the OTP at prompt time so
483
+ long releases do not reuse a stale TOTP.
484
+
485
+ #### Family releases and 1Password
486
+
487
+ `kettle-release` owns the single-gem release flow. Family-wide release
488
+ orchestration depends on the separate
489
+ [kettle-family](https://github.com/kettle-dev/kettle-family) gem:
490
+ `kettle-family release` selects sibling or monorepo members and delegates each
491
+ publish step to `kettle-release`. For family releases, the usual publish
492
+ command is:
493
+
494
+ ```console
495
+ kettle-family release --publish --execute
496
+ ```
497
+
498
+ By default, `kettle-family` prompts once for the gem signing key password and
499
+ leaves RubyGems MFA prompts interactive. To run a family release with the local
500
+ 1Password CLI, configure `release.secrets` in `.kettle-family.yml` and pass
501
+ `--secrets-provider 1password`:
502
+
503
+ ```yaml
504
+ release:
505
+ secrets:
506
+ provider: 1password
507
+ item: Rubygems
508
+ gem_signing_passphrase_field: GEM-SIGN-PASSPHRASE
509
+ rubygems_otp_field: one-time password
510
+ ```
511
+
512
+ ```console
513
+ kettle-family release --publish --execute --secrets-provider 1password
514
+ ```
515
+
516
+ The gem signing passphrase is loaded once by `kettle-family` and handed to
517
+ child `kettle-release` processes through an internal environment integration so
518
+ 1Password is not queried repeatedly for the same value. RubyGems OTP values are
519
+ fetched by `kettle-release` when each MFA prompt appears, so direct and family
520
+ releases share the same OTP behavior. Secret values are not written to the text
521
+ report, NDJSON events, or temporary release files.
522
+
523
+ For vault-specific or field-specific lookups, use explicit 1Password
524
+ references. `rubygems_otp_reference` is read with `op read`; otherwise the OTP
525
+ path uses `op item get ITEM --otp`.
526
+
527
+ ```yaml
528
+ release:
529
+ secrets:
530
+ provider: 1password
531
+ account: my.1password.com
532
+ gem_signing_passphrase_reference: op://Private/Rubygems/GEM-SIGN-PASSPHRASE
533
+ rubygems_otp_reference: op://Private/Rubygems/one-time password?attribute=otp
534
+ ```
535
+
536
+ If an old failed family release left unpublished sibling versions installed
537
+ locally and Bundler keeps selecting them, clean them before retrying:
538
+
539
+ ```console
540
+ kettle-family clean-unreleased --execute
541
+ ```
542
+
543
+ The cleanup command is scoped to selected family members and removes local gem
544
+ versions that are newer than the latest released version.
545
+
432
546
  ### Changelog generator
433
547
 
434
548
  - Script: `exe/kettle-bump` (run as `kettle-bump`)
@@ -891,7 +1005,7 @@ Thanks for RTFM. ☺️
891
1005
  [📌gitmoji]: https://gitmoji.dev
892
1006
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
893
1007
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
894
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-4.433-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
1008
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-5.004-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
895
1009
  [🔐security]: https://github.com/kettle-dev/kettle-dev/blob/main/SECURITY.md
896
1010
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
897
1011
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
data/exe/kettle-changelog CHANGED
@@ -59,7 +59,7 @@ end
59
59
 
60
60
  if ARGV.include?("-h") || ARGV.include?("--help")
61
61
  puts <<~USAGE
62
- Usage: kettle-changelog [--version VERSION] [--update-prep] [--pending-release] [--release-state] [--refresh-cache] [--add-unreleased-entry --section SECTION --entry TEXT] [--json] [--no-strict] [--no-coverage-threshold]
62
+ Usage: kettle-changelog [--version VERSION] [--yes] [--update-prep] [--pending-release] [--release-state] [--refresh-cache] [--add-unreleased-entry --section SECTION --entry TEXT] [--json] [--no-strict] [--no-coverage-threshold]
63
63
 
64
64
  Detects the current version from lib/**/version.rb, the latest live release, and
65
65
  the most recent CHANGELOG.md release section, then prompts to confirm the selected plan:
@@ -70,6 +70,7 @@ if ARGV.include?("-h") || ARGV.include?("--help")
70
70
 
71
71
  Options:
72
72
  --version VERSION Use this version instead of detecting VERSION from lib/**/version.rb
73
+ --yes Auto-approve the selected release plan
73
74
  --update-prep Force updating the most recent prepared release section in place
74
75
  --pending-release Query whether the changelog has release work pending; exits 0 for yes, 1 for no
75
76
  --release-state,
@@ -135,6 +136,7 @@ begin
135
136
  # Determine if strict mode is enabled (default: true)
136
137
  strict_mode = !ARGV.include?("--no-strict") && ENV.fetch("K_CHANGELOG_STRICT", "true").downcase != "false"
137
138
  update_prep = ARGV.delete("--update-prep")
139
+ yes = !!ARGV.delete("--yes")
138
140
  pending_release_query = ARGV.delete("--pending-release")
139
141
  release_state_query = ARGV.delete("--release-state") || ARGV.delete("--release-status")
140
142
  refresh_cache = ARGV.delete("--refresh-cache")
@@ -174,7 +176,7 @@ begin
174
176
  exit(0)
175
177
  end
176
178
 
177
- cli = Kettle::Dev::ChangelogCLI.new(strict: strict_mode, enforce_coverage_thresholds: coverage_hard, update_prep: update_prep, version: version_override, refresh_cache: refresh_cache)
179
+ cli = Kettle::Dev::ChangelogCLI.new(strict: strict_mode, enforce_coverage_thresholds: coverage_hard, update_prep: update_prep, version: version_override, refresh_cache: refresh_cache, yes: yes)
178
180
  if release_state_query
179
181
  state = cli.release_state
180
182
  puts(json_output ? JSON.pretty_generate(state) : cli.release_state_table(state))
data/exe/kettle-release CHANGED
@@ -49,7 +49,7 @@ end
49
49
  # Do not guard with __FILE__ == $PROGRAM_NAME because binstubs use Kernel.load.
50
50
  if ARGV.include?("-h") || ARGV.include?("--help")
51
51
  puts <<~USAGE
52
- Usage: kettle-release [--version VERSION] [--local-ci] [--appraisal-update] [--skip-bundle-audit] [--skip-steps STEPS] [--ci-workflows WORKFLOWS] [--skip-remotes REMOTES] [--json|--events[=TYPES]] [--report PATH] [start_step=<0-19>]
52
+ Usage: kettle-release [--version VERSION] [--local-ci] [--yes] [--appraisal-update] [--skip-bundle-audit] [--skip-steps STEPS] [--ci-workflows WORKFLOWS] [--skip-remotes REMOTES] [--secrets-provider NAME] [--json|--events[=TYPES]] [--report PATH] [start_step=<0-19>]
53
53
 
54
54
  Automates the release flow for a Ruby gem in the host project.
55
55
 
@@ -85,10 +85,12 @@ if ARGV.include?("-h") || ARGV.include?("--help")
85
85
  skip_steps=<numbers> # Comma-separated numbered steps to skip while running the rest
86
86
  --skip-steps NUMBERS # Alias for skip_steps=NUMBERS (e.g., --skip-steps 10 or --skip-steps 10,18)
87
87
  --version VERSION # Use this version instead of detecting VERSION from lib/**/version.rb
88
+ --yes # Auto-approve release confirmation prompts
88
89
  --appraisal-update # Use slower appraisal:update instead of default appraisal:generate
89
90
  --skip-bundle-audit # Skip bundle:audit/update during release rake checks
90
91
  --ci-workflows WORKFLOWS # Comma-separated workflow files or stems to monitor at CI step 10
91
92
  --skip-remotes REMOTES # Comma-separated git remote names to exclude from release fetch/push parity
93
+ --secrets-provider NAME # Release secrets provider: interactive, 1password
92
94
  --json # Print final machine-readable release report as JSON
93
95
  --events[=TYPES] # Print newline-delimited JSON release events, optionally filtered by type
94
96
  --report PATH # Write final machine-readable release report as JSON
@@ -102,6 +104,19 @@ if ARGV.include?("-h") || ARGV.include?("--help")
102
104
  K_RELEASE_LOCAL_CI_WORKFLOW # Name of workflow (without .yml) for local CI; defaults to locked_deps or first
103
105
  K_RELEASE_CI_WORKFLOWS # Comma-separated workflow files or stems to monitor at CI step 10
104
106
  K_RELEASE_SKIP_REMOTES # Comma-separated git remote names to exclude from release fetch/push parity
107
+ KETTLE_RELEASE_SECRETS_PROVIDER=1password
108
+ # Load release secrets through the configured provider
109
+ KETTLE_RELEASE_1PASSWORD_ITEM=Rubygems
110
+ KETTLE_RELEASE_1PASSWORD_GEM_SIGNING_PASSPHRASE_FIELD=GEM-SIGN-PASSPHRASE
111
+ KETTLE_RELEASE_1PASSWORD_RUBYGEMS_OTP_FIELD='one-time password'
112
+ # Defaults used by the 1Password provider
113
+ KETTLE_RELEASE_1PASSWORD_ACCOUNT
114
+ KETTLE_RELEASE_1PASSWORD_GEM_SIGNING_PASSPHRASE_REFERENCE
115
+ KETTLE_RELEASE_1PASSWORD_RUBYGEMS_OTP_REFERENCE
116
+ # Optional explicit 1Password account or op:// references
117
+ KETTLE_RELEASE_GEM_SIGNING_PASSPHRASE_SOURCE=cached
118
+ KETTLE_RELEASE_GEM_SIGNING_PASSPHRASE
119
+ # Internal family integration: reuse a cached passphrase
105
120
  KETTLE_RELEASE_APPRAISAL_TASK=appraisal:update
106
121
  # Use slower appraisal:update instead of default appraisal:generate
107
122
  KETTLE_DEV_SKIP_BUNDLE_AUDIT=true
@@ -221,6 +236,27 @@ def extract_report_arg!(argv)
221
236
  report_path
222
237
  end
223
238
 
239
+ def extract_secrets_provider_arg!(argv)
240
+ provider = nil
241
+ if (idx = argv.index("--secrets-provider"))
242
+ provider = argv[idx + 1]
243
+ if provider.to_s.empty? || provider.to_s.start_with?("-")
244
+ Kettle::Dev::ExitAdapter.abort("--secrets-provider requires a provider name")
245
+ end
246
+ argv.slice!(idx, 2)
247
+ end
248
+ argv.delete_if do |arg|
249
+ if arg.start_with?("--secrets-provider=", "secrets_provider=")
250
+ provider = arg.split("=", 2)[1]
251
+ Kettle::Dev::ExitAdapter.abort("--secrets-provider requires a provider name") if provider.to_s.empty?
252
+ true
253
+ else
254
+ false
255
+ end
256
+ end
257
+ provider
258
+ end
259
+
224
260
  def extract_events_arg!(argv)
225
261
  events = false
226
262
  event_types = nil
@@ -238,6 +274,7 @@ def extract_events_arg!(argv)
238
274
  end
239
275
 
240
276
  local_ci = ARGV.include?("--local-ci")
277
+ yes = !!ARGV.delete("--yes")
241
278
  appraisal_task = ARGV.delete("--appraisal-update") ? "appraisal:update" : nil
242
279
  skip_bundle_audit = !!ARGV.delete("--skip-bundle-audit")
243
280
  json_output = !!ARGV.delete("--json")
@@ -250,10 +287,11 @@ skip_steps = extract_skip_steps_arg!(ARGV)
250
287
  ci_workflows = extract_ci_workflows_arg!(ARGV)
251
288
  skip_remotes = extract_skip_remotes_arg!(ARGV)
252
289
  report_path = extract_report_arg!(ARGV)
290
+ secrets_provider = extract_secrets_provider_arg!(ARGV)
253
291
 
254
292
  begin
255
293
  event_stream = events_output ? Kettle::Ndjson.event_stream($stdout, types: event_types) : nil
256
- Kettle::Dev::ReleaseCLI.new(start_step: start_step, local_ci: local_ci, version: version_override, appraisal_task: appraisal_task, skip_steps: skip_steps, skip_bundle_audit: skip_bundle_audit, ci_workflows: ci_workflows, skip_remotes: skip_remotes, event_stream: event_stream, json_output: json_output, json_io: $stdout, report_path: report_path).run
294
+ Kettle::Dev::ReleaseCLI.new(start_step: start_step, local_ci: local_ci, version: version_override, appraisal_task: appraisal_task, skip_steps: skip_steps, skip_bundle_audit: skip_bundle_audit, ci_workflows: ci_workflows, skip_remotes: skip_remotes, secrets_provider_name: secrets_provider, yes: yes, event_stream: event_stream, json_output: json_output, json_io: $stdout, report_path: report_path).run
257
295
  rescue LoadError => e
258
296
  warn("#{script_basename}: could not load dependency: #{e.class}: #{e.message}")
259
297
  warn(Array(e.backtrace).join("\n")) if ENV["DEBUG"]
data/exe/kettle-reset ADDED
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ $stdout.sync = true
5
+ $stderr.sync = true
6
+
7
+ begin
8
+ require "rubygems"
9
+ rescue LoadError
10
+ end
11
+
12
+ script_basename = File.basename(__FILE__)
13
+ repo_lib = File.expand_path("../lib", __dir__)
14
+ $LOAD_PATH.unshift(repo_lib) if File.directory?(repo_lib) && !$LOAD_PATH.include?(repo_lib)
15
+
16
+ begin
17
+ require "kettle/dev"
18
+ require "kettle/dev/executable_version"
19
+ Kettle::Dev::ExecutableVersion.print_and_exit!(script_basename, ARGV)
20
+ Kettle::Dev::ExecutableVersion.print_header(script_basename)
21
+ rescue LoadError => e
22
+ warn("#{script_basename}: could not load dependency: #{e.class}: #{e.message}")
23
+ warn("Hint: Ensure the host project has kettle-dev as a dependency and run bundle install.")
24
+ exit(1)
25
+ end
26
+
27
+ begin
28
+ exit(Kettle::Dev::ResetCLI.new(ARGV).run!)
29
+ rescue SystemExit
30
+ raise
31
+ rescue => e
32
+ warn("#{script_basename}: #{e.message}")
33
+ warn(e.backtrace.join("\n")) if ENV["DEBUG"]
34
+ exit(1)
35
+ end