kettle-family 0.1.5 → 0.1.6
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
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +22 -1
- data/README.md +30 -10
- data/lib/kettle/family/cli.rb +17 -5
- data/lib/kettle/family/command_runner.rb +16 -5
- data/lib/kettle/family/report.rb +1 -0
- data/lib/kettle/family/version.rb +1 -1
- data/lib/kettle/family/workflow.rb +18 -33
- data.tar.gz.sig +0 -0
- metadata +8 -8
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: baca0a14eeb69f6e1922a2b6cd9cf274606744a9b1188001cfa7c2f54a5b67d1
|
|
4
|
+
data.tar.gz: 4d8e0618681191d9b7c04c6318f1ecbba2e12a2932f582bb4a2eff6f4588c5b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2f95b4376c2d62097e3775d56d9b1e2e1ab3ecf84ab25a9d204de8e021cdee6182e102dfb4e62c895867a432907a72919748b745b4e6b317a14c9103ce4d1d94
|
|
7
|
+
data.tar.gz: e16a973e624bc4e242c37b46cc12dc8c06fc1196c506de320ad56d8f5b384fcaa7adb40f5a19d107a78671f2e21358b72c855c03ff00cd1656d327f11349e442
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,25 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [0.1.6] - 2026-06-18
|
|
34
|
+
|
|
35
|
+
- TAG: [v0.1.6][0.1.6t]
|
|
36
|
+
- COVERAGE: 94.12% -- 1169/1242 lines in 20 files
|
|
37
|
+
- BRANCH COVERAGE: 76.97% -- 361/469 branches in 20 files
|
|
38
|
+
- 39.73% documented
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- `kettle-family template` now lets each member `kettle-jem` run create its own
|
|
43
|
+
templating commit by default; use `--no-commit` to pass `--skip-commit` to
|
|
44
|
+
member templating commands.
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
|
|
48
|
+
- Added `--env KEY=VALUE` workflow overrides so `kettle-family` commands can
|
|
49
|
+
run a session with explicit environment values after member `mise.toml`
|
|
50
|
+
defaults have loaded.
|
|
51
|
+
|
|
33
52
|
## [0.1.5] - 2026-06-17
|
|
34
53
|
|
|
35
54
|
- TAG: [v0.1.5][0.1.5t]
|
|
@@ -157,7 +176,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
157
176
|
- Fixed CI load failures on engines without compatible `pty` support by falling back to Open3 for interactive release commands.
|
|
158
177
|
- Fixed Ruby 3.2 version-bump support by loading Prism lazily and wiring the Prism gem only for MRI versions that need it.
|
|
159
178
|
|
|
160
|
-
[Unreleased]: https://github.com/kettle-dev/kettle-family/compare/v0.1.
|
|
179
|
+
[Unreleased]: https://github.com/kettle-dev/kettle-family/compare/v0.1.6...HEAD
|
|
180
|
+
[0.1.6]: https://github.com/kettle-dev/kettle-family/compare/v0.1.5...v0.1.6
|
|
181
|
+
[0.1.6t]: https://github.com/kettle-dev/kettle-family/releases/tag/v0.1.6
|
|
161
182
|
[0.1.5]: https://github.com/kettle-dev/kettle-family/compare/v0.1.4...v0.1.5
|
|
162
183
|
[0.1.5t]: https://github.com/kettle-dev/kettle-family/releases/tag/v0.1.5
|
|
163
184
|
[0.1.4]: https://github.com/kettle-dev/kettle-family/compare/v0.1.3...v0.1.4
|
data/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
[![OpenCollective Backers][🖇osc-backers-i]][🖇osc-backers] [![OpenCollective Sponsors][🖇osc-sponsors-i]][🖇osc-sponsors] [![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay] [![Donate on PayPal][🖇paypal-img]][🖇paypal] [![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate on Polar][🖇polar-img]][🖇polar] [![Donate at ko-fi.com][🖇kofi-img]][🖇kofi]
|
|
14
14
|
|
|
15
|
-
<details>
|
|
15
|
+
<details markdown="1">
|
|
16
16
|
<summary>👣 How will this project approach the September 2025 hostile takeover of RubyGems? 🚑️</summary>
|
|
17
17
|
|
|
18
18
|
I've summarized my thoughts in [this blog post](https://dev.to/galtzo/hostile-takeover-of-rubygems-my-thoughts-5hlo).
|
|
@@ -44,9 +44,9 @@ while RubyGems MFA prompts remain interactive.
|
|
|
44
44
|
|
|
45
45
|
| Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
|
|
46
46
|
|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
47
|
-
| Works with JRuby | [![JRuby current Compat][💎jruby-c-i]][🚎10-j-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf]|
|
|
48
|
-
| Works with Truffle Ruby | [![Truffle Ruby 24.2 Compat][💎truby-24.2i]][🚎truby-24.2-wf] [![Truffle Ruby 25.0 Compat][💎truby-25.0i]][🚎truby-25.0-wf] [![Truffle Ruby current Compat][💎truby-c-i]][🚎9-t-wf]|
|
|
49
|
-
| Works with MRI Ruby 4 | [![Ruby
|
|
47
|
+
| Works with JRuby | [![JRuby 10.0 Compat][💎jruby-10.0i]][🚎jruby-10.0-wf] [![JRuby current Compat][💎jruby-c-i]][🚎10-j-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf]|
|
|
48
|
+
| Works with Truffle Ruby | [![Truffle Ruby 24.2 Compat][💎truby-24.2i]][🚎truby-24.2-wf] [![Truffle Ruby 25.0 Compat][💎truby-25.0i]][🚎truby-25.0-wf] [![Truffle Ruby 33.0 Compat][💎truby-33.0i]][🚎truby-33.0-wf] [![Truffle Ruby current Compat][💎truby-c-i]][🚎9-t-wf] [![Truffle Ruby HEAD Compat][💎truby-headi]][🚎3-hd-wf]|
|
|
49
|
+
| Works with MRI Ruby 4 | [![Ruby current Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf]|
|
|
50
50
|
| Works with MRI Ruby 3 | [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎ruby-3.2-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎ruby-3.3-wf] [![Ruby 3.4 Compat][💎ruby-3.4i]][🚎ruby-3.4-wf]|
|
|
51
51
|
| Support & Community | [![Join Me on Daily.dev's RubyFriends][✉️ruby-friends-img]][✉️ruby-friends] [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] [![Get help from me on Upwork][👨🏼🏫expsup-upwork-img]][👨🏼🏫expsup-upwork] [![Get help from me on Codementor][👨🏼🏫expsup-codementor-img]][👨🏼🏫expsup-codementor] |
|
|
52
52
|
| Source | [![Source on GitLab.com][📜src-gl-img]][📜src-gl] [![Source on CodeBerg.org][📜src-cb-img]][📜src-cb] [![Source on Github.com][📜src-gh-img]][📜src-gh] [![The best SHA: dQw4w9WgXcQ!][🧮kloc-img]][🧮kloc] |
|
|
@@ -64,9 +64,25 @@ This test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml` and
|
|
|
64
64
|
may be higher than the gem's runtime compatibility floor when legacy Rubies are
|
|
65
65
|
not practical for the current toolchain.
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
<a href="https://github.com/kettle-dev"><img alt="kettle-dev Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/kettle-dev/avatar-128px.svg" width="14%" align="right"/></a>
|
|
68
|
+
|
|
69
|
+
The _amazing_ test matrix is powered by the kettle-dev stack.
|
|
70
|
+
|
|
71
|
+
<details markdown="1">
|
|
72
|
+
<summary>How kettle-dev manages complexity in tests</summary>
|
|
73
|
+
|
|
74
|
+
| Gem | Source | Role | Daily download rank |
|
|
75
|
+
|-----|--------|------|---------------------|
|
|
76
|
+
| [appraisal2](https://bestgems.org/gems/appraisal2) | [GitHub](https://github.com/appraisal-rb/appraisal2) | multi-dependency Appraisal matrix generation | [](https://bestgems.org/gems/appraisal2) |
|
|
77
|
+
| [appraisal2-rubocop](https://bestgems.org/gems/appraisal2-rubocop) | [GitHub](https://github.com/appraisal-rb/appraisal2-rubocop) | RuboCop Appraisal generator integration | [](https://bestgems.org/gems/appraisal2-rubocop) |
|
|
78
|
+
| [kettle-dev](https://bestgems.org/gems/kettle-dev) | [GitHub](https://github.com/kettle-dev/kettle-dev) | development, release, and CI workflow tooling | [](https://bestgems.org/gems/kettle-dev) |
|
|
79
|
+
| [kettle-jem](https://bestgems.org/gems/kettle-jem) | [GitHub](https://github.com/kettle-dev/kettle-jem) | Appraisals & CI workflow templates | [](https://bestgems.org/gems/kettle-jem) |
|
|
80
|
+
| [kettle-soup-cover](https://bestgems.org/gems/kettle-soup-cover) | [GitHub](https://github.com/kettle-dev/kettle-soup-cover) | SimpleCov coverage policy and reporting | [](https://bestgems.org/gems/kettle-soup-cover) |
|
|
81
|
+
| [kettle-test](https://bestgems.org/gems/kettle-test) | [GitHub](https://github.com/kettle-dev/kettle-test) | standard test runner and coverage harness | [](https://bestgems.org/gems/kettle-test) |
|
|
82
|
+
| [rubocop-lts](https://bestgems.org/gems/rubocop-lts) | [GitHub](https://github.com/rubocop-lts/rubocop-lts) | Ruby-version-aware linting | [](https://bestgems.org/gems/rubocop-lts) |
|
|
83
|
+
| [turbo_tests2](https://bestgems.org/gems/turbo_tests2) | [GitHub](https://github.com/galtzo-floss/turbo_tests2) | parallel test execution | [](https://bestgems.org/gems/turbo_tests2) |
|
|
84
|
+
|
|
85
|
+
</details>
|
|
70
86
|
|
|
71
87
|
### Federated DVCS
|
|
72
88
|
|
|
@@ -306,7 +322,7 @@ Made with [contributors-img][🖐contrib-rocks].
|
|
|
306
322
|
|
|
307
323
|
Also see GitLab Contributors: [https://gitlab.com/kettle-dev/kettle-family/-/graphs/main][🚎contributors-gl]
|
|
308
324
|
|
|
309
|
-
<details>
|
|
325
|
+
<details markdown="1">
|
|
310
326
|
<summary>⭐️ Star History</summary>
|
|
311
327
|
|
|
312
328
|
<a href="https://star-history.com/kettle-dev/kettle-family&Date">
|
|
@@ -489,8 +505,10 @@ Thanks for RTFM. ☺️
|
|
|
489
505
|
[🚎ruby-3.2-wf]: https://github.com/kettle-dev/kettle-family/actions/workflows/ruby-3.2.yml
|
|
490
506
|
[🚎ruby-3.3-wf]: https://github.com/kettle-dev/kettle-family/actions/workflows/ruby-3.3.yml
|
|
491
507
|
[🚎ruby-3.4-wf]: https://github.com/kettle-dev/kettle-family/actions/workflows/ruby-3.4.yml
|
|
508
|
+
[🚎jruby-10.0-wf]: https://github.com/kettle-dev/kettle-family/actions/workflows/jruby-10.0.yml
|
|
492
509
|
[🚎truby-24.2-wf]: https://github.com/kettle-dev/kettle-family/actions/workflows/truffleruby-24.2.yml
|
|
493
510
|
[🚎truby-25.0-wf]: https://github.com/kettle-dev/kettle-family/actions/workflows/truffleruby-25.0.yml
|
|
511
|
+
[🚎truby-33.0-wf]: https://github.com/kettle-dev/kettle-family/actions/workflows/truffleruby-33.0.yml
|
|
494
512
|
[🚎2-cov-wf]: https://github.com/kettle-dev/kettle-family/actions/workflows/coverage.yml
|
|
495
513
|
[🚎2-cov-wfi]: https://github.com/kettle-dev/kettle-family/actions/workflows/coverage.yml/badge.svg
|
|
496
514
|
[🚎3-hd-wf]: https://github.com/kettle-dev/kettle-family/actions/workflows/heads.yml
|
|
@@ -512,12 +530,14 @@ Thanks for RTFM. ☺️
|
|
|
512
530
|
[💎ruby-3.2i]: https://img.shields.io/badge/Ruby-3.2-CC342D?style=for-the-badge&logo=ruby&logoColor=white
|
|
513
531
|
[💎ruby-3.3i]: https://img.shields.io/badge/Ruby-3.3-CC342D?style=for-the-badge&logo=ruby&logoColor=white
|
|
514
532
|
[💎ruby-3.4i]: https://img.shields.io/badge/Ruby-3.4-CC342D?style=for-the-badge&logo=ruby&logoColor=white
|
|
515
|
-
[💎ruby-4.0i]: https://img.shields.io/badge/Ruby-4.0-CC342D?style=for-the-badge&logo=ruby&logoColor=white
|
|
516
533
|
[💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green
|
|
517
534
|
[💎ruby-headi]: https://img.shields.io/badge/Ruby-HEAD-CC342D?style=for-the-badge&logo=ruby&logoColor=blue
|
|
518
535
|
[💎truby-24.2i]: https://img.shields.io/badge/Truffle_Ruby-24.2-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
519
536
|
[💎truby-25.0i]: https://img.shields.io/badge/Truffle_Ruby-25.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
537
|
+
[💎truby-33.0i]: https://img.shields.io/badge/Truffle_Ruby-33.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
|
520
538
|
[💎truby-c-i]: https://img.shields.io/badge/Truffle_Ruby-current-34BCB1?style=for-the-badge&logo=ruby&logoColor=green
|
|
539
|
+
[💎truby-headi]: https://img.shields.io/badge/Truffle_Ruby-HEAD-34BCB1?style=for-the-badge&logo=ruby&logoColor=blue
|
|
540
|
+
[💎jruby-10.0i]: https://img.shields.io/badge/JRuby-10.0-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
|
521
541
|
[💎jruby-c-i]: https://img.shields.io/badge/JRuby-current-FBE742?style=for-the-badge&logo=ruby&logoColor=green
|
|
522
542
|
[💎jruby-headi]: https://img.shields.io/badge/JRuby-HEAD-FBE742?style=for-the-badge&logo=ruby&logoColor=blue
|
|
523
543
|
[🤝gh-issues]: https://github.com/kettle-dev/kettle-family/issues
|
|
@@ -546,7 +566,7 @@ Thanks for RTFM. ☺️
|
|
|
546
566
|
[📌gitmoji]: https://gitmoji.dev
|
|
547
567
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
548
568
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
549
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-1.
|
|
569
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-1.242-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
550
570
|
[🔐security]: https://github.com/kettle-dev/kettle-family/blob/main/SECURITY.md
|
|
551
571
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
552
572
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
data/lib/kettle/family/cli.rb
CHANGED
|
@@ -74,6 +74,7 @@ module Kettle
|
|
|
74
74
|
--report PATH Write JSON report to PATH
|
|
75
75
|
--execute Execute external workflow commands
|
|
76
76
|
--dry-run Plan external workflow commands without running them (default)
|
|
77
|
+
--env KEY=VALUE Override an environment variable for each member workflow command
|
|
77
78
|
--check Check whether bump-version would need edits
|
|
78
79
|
--from VERSION Require selected members to currently match VERSION
|
|
79
80
|
--publish Use publish release command instead of build command
|
|
@@ -84,9 +85,9 @@ module Kettle
|
|
|
84
85
|
Set K_RELEASE_CI_CONTINUE=true for release commands
|
|
85
86
|
--tag Add release tag phase
|
|
86
87
|
--push Add release push phase
|
|
87
|
-
--commit
|
|
88
|
-
--no-commit
|
|
89
|
-
--allow-dirty
|
|
88
|
+
--commit Allow each templated member's kettle-jem run to commit (default)
|
|
89
|
+
--no-commit Pass --skip-commit to each templated member's kettle-jem run
|
|
90
|
+
--allow-dirty Reserved for compatibility; member repos manage their own commit safety
|
|
90
91
|
--help Print this help
|
|
91
92
|
HELP
|
|
92
93
|
0
|
|
@@ -101,6 +102,7 @@ module Kettle
|
|
|
101
102
|
json: false,
|
|
102
103
|
report: nil,
|
|
103
104
|
execute: false,
|
|
105
|
+
workflow_env: {},
|
|
104
106
|
check: false,
|
|
105
107
|
from_version: nil,
|
|
106
108
|
publish: false,
|
|
@@ -109,7 +111,7 @@ module Kettle
|
|
|
109
111
|
release_continue_ci_failures: false,
|
|
110
112
|
tag: false,
|
|
111
113
|
push: false,
|
|
112
|
-
commit:
|
|
114
|
+
commit: true,
|
|
113
115
|
allow_dirty: false
|
|
114
116
|
}
|
|
115
117
|
OptionParser.new do |parser|
|
|
@@ -121,6 +123,7 @@ module Kettle
|
|
|
121
123
|
parser.on("--report PATH") { |value| options[:report] = value }
|
|
122
124
|
parser.on("--execute") { options[:execute] = true }
|
|
123
125
|
parser.on("--dry-run") { options[:execute] = false }
|
|
126
|
+
parser.on("--env KEY=VALUE") { |value| parse_env_override(value, options[:workflow_env]) }
|
|
124
127
|
parser.on("--check") { options[:check] = true }
|
|
125
128
|
parser.on("--from VERSION") { |value| options[:from_version] = value }
|
|
126
129
|
parser.on("--publish") { options[:publish] = true }
|
|
@@ -188,10 +191,19 @@ module Kettle
|
|
|
188
191
|
tag: options[:tag],
|
|
189
192
|
start_step: options[:release_start_step],
|
|
190
193
|
local_ci: options[:release_local_ci],
|
|
191
|
-
continue_ci_failures: options[:release_continue_ci_failures]
|
|
194
|
+
continue_ci_failures: options[:release_continue_ci_failures],
|
|
195
|
+
env_overrides: options[:workflow_env]
|
|
192
196
|
).results
|
|
193
197
|
end
|
|
194
198
|
|
|
199
|
+
def parse_env_override(value, env)
|
|
200
|
+
key, env_value = value.split("=", 2)
|
|
201
|
+
raise OptionParser::InvalidArgument, "--env requires KEY=VALUE" if key.to_s.empty? || env_value.nil?
|
|
202
|
+
raise OptionParser::InvalidArgument, "invalid environment variable name #{key.inspect}" unless key.match?(/\A[A-Za-z_][A-Za-z0-9_]*\z/)
|
|
203
|
+
|
|
204
|
+
env[key] = env_value
|
|
205
|
+
end
|
|
206
|
+
|
|
195
207
|
def bump_version_results(members:, options:)
|
|
196
208
|
VersionBump.new(
|
|
197
209
|
members: members,
|
|
@@ -11,14 +11,15 @@ module Kettle
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def call(member:, phase:, command:, env: {}, interactive: false)
|
|
14
|
-
argv = command_argv(member: member, command: command)
|
|
14
|
+
argv = command_argv(member: member, command: command, env: env)
|
|
15
|
+
process_env = process_env(member: member, env: env)
|
|
15
16
|
return skipped_result(member: member, phase: phase, argv: argv) unless execute
|
|
16
17
|
|
|
17
18
|
started = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
18
19
|
stdout, stderr, status = if interactive
|
|
19
|
-
run_interactive(env:
|
|
20
|
+
run_interactive(env: process_env, argv: argv, chdir: member.root)
|
|
20
21
|
else
|
|
21
|
-
Open3.capture3(
|
|
22
|
+
Open3.capture3(process_env, *argv, chdir: member.root)
|
|
22
23
|
end
|
|
23
24
|
elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - started
|
|
24
25
|
CommandResult.new(
|
|
@@ -130,11 +131,21 @@ module Kettle
|
|
|
130
131
|
chunk.match?(/pass(?:\s|-)?phrase|PEM password|private key password/i)
|
|
131
132
|
end
|
|
132
133
|
|
|
133
|
-
def command_argv(member:, command:)
|
|
134
|
+
def command_argv(member:, command:, env: {})
|
|
134
135
|
argv = normalize_command(command)
|
|
135
136
|
return argv unless File.file?(File.join(member.root, "mise.toml"))
|
|
136
137
|
|
|
137
|
-
|
|
138
|
+
injected_env = env.map { |key, value| "#{key}=#{value}" }
|
|
139
|
+
mise_argv = ["mise", "exec", "-C", member.root, "--"]
|
|
140
|
+
return [*mise_argv, *argv] if injected_env.empty?
|
|
141
|
+
|
|
142
|
+
[*mise_argv, "env", *injected_env, *argv]
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
def process_env(member:, env:)
|
|
146
|
+
return env unless File.file?(File.join(member.root, "mise.toml"))
|
|
147
|
+
|
|
148
|
+
{}
|
|
138
149
|
end
|
|
139
150
|
|
|
140
151
|
def normalize_command(command)
|
data/lib/kettle/family/report.rb
CHANGED
|
@@ -72,6 +72,7 @@ module Kettle
|
|
|
72
72
|
results.each do |result|
|
|
73
73
|
lines << " #{result_state(result)} #{result.member_name} #{result.phase} #{result.reason || ""}".rstrip
|
|
74
74
|
lines << " #{result.stdout}" unless result.stdout.to_s.empty?
|
|
75
|
+
lines << " #{result.stderr}" if !result.ok? && !result.stderr.to_s.empty?
|
|
75
76
|
lines << " resume: #{resume_hint_for(result)}" unless result.ok?
|
|
76
77
|
end
|
|
77
78
|
end
|
|
@@ -15,7 +15,7 @@ module Kettle
|
|
|
15
15
|
"docs" => "bundle exec rake yard"
|
|
16
16
|
}.freeze
|
|
17
17
|
|
|
18
|
-
def initialize(command:, config:, members:, execute: false, commit:
|
|
18
|
+
def initialize(command:, config:, members:, execute: false, commit: true, allow_dirty: false, publish: false, push: false, tag: false, start_step: nil, local_ci: false, continue_ci_failures: false, env_overrides: {})
|
|
19
19
|
@command = command
|
|
20
20
|
@config = config
|
|
21
21
|
@members = members
|
|
@@ -28,30 +28,32 @@ module Kettle
|
|
|
28
28
|
@start_step = start_step
|
|
29
29
|
@local_ci = local_ci
|
|
30
30
|
@continue_ci_failures = continue_ci_failures
|
|
31
|
+
@env_overrides = env_overrides
|
|
31
32
|
@gem_signing_password = nil
|
|
32
33
|
end
|
|
33
34
|
|
|
34
35
|
def results
|
|
35
36
|
return check_results if command == "check"
|
|
36
37
|
return release_results if command == "release"
|
|
37
|
-
guard_family_commit!
|
|
38
|
-
|
|
39
38
|
runner = CommandRunner.new(execute: execute)
|
|
40
39
|
command_text = workflow_command
|
|
41
|
-
|
|
40
|
+
members.each_with_object([]) do |member, memo|
|
|
41
|
+
if command == "template" && config.normalize_lockfiles?
|
|
42
|
+
normalize_lockfiles(member: member, runner: runner, memo: memo, phase: "prepare_lockfiles")
|
|
43
|
+
break memo unless memo.last.ok?
|
|
44
|
+
end
|
|
45
|
+
|
|
42
46
|
result = runner.call(member: member, phase: command, command: command_text, env: workflow_env)
|
|
43
47
|
memo << result
|
|
44
48
|
break memo unless result.ok?
|
|
45
49
|
|
|
46
|
-
normalize_lockfiles(member: member, runner: runner, memo: memo) if command == "template"
|
|
50
|
+
normalize_lockfiles(member: member, runner: runner, memo: memo, phase: "normalize_lockfiles") if command == "template"
|
|
47
51
|
end
|
|
48
|
-
append_family_commit(results: results, runner: runner)
|
|
49
|
-
results
|
|
50
52
|
end
|
|
51
53
|
|
|
52
54
|
private
|
|
53
55
|
|
|
54
|
-
attr_reader :command, :config, :members, :execute, :commit, :allow_dirty, :publish, :push, :tag, :start_step, :local_ci, :continue_ci_failures
|
|
56
|
+
attr_reader :command, :config, :members, :execute, :commit, :allow_dirty, :publish, :push, :tag, :start_step, :local_ci, :continue_ci_failures, :env_overrides
|
|
55
57
|
|
|
56
58
|
def check_results
|
|
57
59
|
members.map { |member| ReadinessCheck.call(member: member, config: config) }
|
|
@@ -229,14 +231,6 @@ module Kettle
|
|
|
229
231
|
raise Error, "gem signing password is required" if @gem_signing_password.to_s.empty?
|
|
230
232
|
end
|
|
231
233
|
|
|
232
|
-
def guard_family_commit!
|
|
233
|
-
return unless command == "template" && commit && execute
|
|
234
|
-
return if allow_dirty
|
|
235
|
-
return unless GitStatus.dirty?(config.root)
|
|
236
|
-
|
|
237
|
-
raise Error, "refusing template --commit with dirty worktree; pass --allow-dirty to override"
|
|
238
|
-
end
|
|
239
|
-
|
|
240
234
|
def workflow_command
|
|
241
235
|
return template_command if command == "template"
|
|
242
236
|
|
|
@@ -250,6 +244,7 @@ module Kettle
|
|
|
250
244
|
|
|
251
245
|
def template_command
|
|
252
246
|
command_text = config.template_command || DEFAULT_COMMANDS.fetch("template")
|
|
247
|
+
return command_text if commit
|
|
253
248
|
return command_text if command_text.is_a?(Array) && command_text.include?("--skip-commit")
|
|
254
249
|
return [*command_text, "--skip-commit"] if command_text.is_a?(Array)
|
|
255
250
|
return command_text if command_text.include?("--skip-commit")
|
|
@@ -258,36 +253,26 @@ module Kettle
|
|
|
258
253
|
end
|
|
259
254
|
|
|
260
255
|
def workflow_env
|
|
261
|
-
return {} unless command == "template"
|
|
262
|
-
|
|
263
256
|
{}.tap do |env|
|
|
264
|
-
|
|
265
|
-
|
|
257
|
+
if command == "template"
|
|
258
|
+
env["KETTLE_JEM_TEMPLATE_PROFILE"] = config.template_profile if config.template_profile
|
|
259
|
+
env["KJ_REPOSITORY_TOPOLOGY"] = config.template_repository_topology if config.template_repository_topology
|
|
260
|
+
end
|
|
261
|
+
env.merge!(env_overrides)
|
|
266
262
|
end
|
|
267
263
|
end
|
|
268
264
|
|
|
269
|
-
def normalize_lockfiles(member:, runner:, memo:)
|
|
265
|
+
def normalize_lockfiles(member:, runner:, memo:, phase:)
|
|
270
266
|
return unless config.normalize_lockfiles?
|
|
271
267
|
|
|
272
268
|
result = runner.call(
|
|
273
269
|
member: member,
|
|
274
|
-
phase:
|
|
270
|
+
phase: phase,
|
|
275
271
|
command: config.normalize_lockfiles_command
|
|
276
272
|
)
|
|
277
273
|
memo << result
|
|
278
274
|
end
|
|
279
275
|
|
|
280
|
-
def append_family_commit(results:, runner:)
|
|
281
|
-
return unless command == "template" && commit
|
|
282
|
-
return unless results.all?(&:ok?)
|
|
283
|
-
|
|
284
|
-
results << runner.call(
|
|
285
|
-
member: family_member,
|
|
286
|
-
phase: "family_commit",
|
|
287
|
-
command: "git add -A && git commit -m 'Apply kettle-family template updates'"
|
|
288
|
-
)
|
|
289
|
-
end
|
|
290
|
-
|
|
291
276
|
def family_member
|
|
292
277
|
Member.new(
|
|
293
278
|
name: config.family_name,
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kettle-family
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -80,7 +80,7 @@ dependencies:
|
|
|
80
80
|
version: '2.2'
|
|
81
81
|
- - ">="
|
|
82
82
|
- !ruby/object:Gem::Version
|
|
83
|
-
version: 2.2.
|
|
83
|
+
version: 2.2.13
|
|
84
84
|
type: :development
|
|
85
85
|
prerelease: false
|
|
86
86
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -90,7 +90,7 @@ dependencies:
|
|
|
90
90
|
version: '2.2'
|
|
91
91
|
- - ">="
|
|
92
92
|
- !ruby/object:Gem::Version
|
|
93
|
-
version: 2.2.
|
|
93
|
+
version: 2.2.13
|
|
94
94
|
- !ruby/object:Gem::Dependency
|
|
95
95
|
name: bundler-audit
|
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -188,7 +188,7 @@ dependencies:
|
|
|
188
188
|
version: '3.1'
|
|
189
189
|
- - ">="
|
|
190
190
|
- !ruby/object:Gem::Version
|
|
191
|
-
version: 3.1.
|
|
191
|
+
version: 3.1.4
|
|
192
192
|
type: :development
|
|
193
193
|
prerelease: false
|
|
194
194
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -198,7 +198,7 @@ dependencies:
|
|
|
198
198
|
version: '3.1'
|
|
199
199
|
- - ">="
|
|
200
200
|
- !ruby/object:Gem::Version
|
|
201
|
-
version: 3.1.
|
|
201
|
+
version: 3.1.4
|
|
202
202
|
- !ruby/object:Gem::Dependency
|
|
203
203
|
name: ruby-progressbar
|
|
204
204
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -309,10 +309,10 @@ licenses:
|
|
|
309
309
|
- AGPL-3.0-only
|
|
310
310
|
metadata:
|
|
311
311
|
homepage_uri: https://kettle-family.galtzo.com
|
|
312
|
-
source_code_uri: https://github.com/kettle-dev/kettle-family/tree/v0.1.
|
|
313
|
-
changelog_uri: https://github.com/kettle-dev/kettle-family/blob/v0.1.
|
|
312
|
+
source_code_uri: https://github.com/kettle-dev/kettle-family/tree/v0.1.6
|
|
313
|
+
changelog_uri: https://github.com/kettle-dev/kettle-family/blob/v0.1.6/CHANGELOG.md
|
|
314
314
|
bug_tracker_uri: https://github.com/kettle-dev/kettle-family/issues
|
|
315
|
-
documentation_uri: https://www.rubydoc.info/gems/kettle-family/0.1.
|
|
315
|
+
documentation_uri: https://www.rubydoc.info/gems/kettle-family/0.1.6
|
|
316
316
|
funding_uri: https://github.com/sponsors/pboling
|
|
317
317
|
wiki_uri: https://github.com/kettle-dev/kettle-family/wiki
|
|
318
318
|
news_uri: https://www.railsbling.com/tags/kettle-family
|
metadata.gz.sig
CHANGED
|
Binary file
|