kettle-dev 2.5.23 → 2.5.25
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 +33 -1
- data/README.md +1 -1
- data/exe/kettle-gh-release +13 -2
- data/lib/kettle/dev/ci_helpers.rb +13 -7
- data/lib/kettle/dev/release_cli.rb +34 -4
- data/lib/kettle/dev/version.rb +1 -1
- data.tar.gz.sig +4 -3
- metadata +4 -4
- 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: 56ce68001beed714f8b15c44336ffe111f1509dfffd9a7063b1bb50f0580fc08
|
|
4
|
+
data.tar.gz: 3088a81db9f6327c55fe9113f45be1768f734d2c8b05cfd0c5a55080450de63f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e9ad45713716d0583fc83e302ea574a67a7855757efc7abf9de24764abd5d66388056677a74a6fbf67a6d05894b4e7edb813c8e9919ddcdb61b03ed694bd70e2
|
|
7
|
+
data.tar.gz: 7aa96f4e87ddb6e6b0d41b19e43c56229cca35dbf470313b50f15c6a35124e4e171383c666766ad6a9a937bf3cc6d496df9be5dd71213647ebb2768937852b8f
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,34 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [2.5.25] - 2026-08-07
|
|
34
|
+
|
|
35
|
+
- TAG: [v2.5.25][2.5.25t]
|
|
36
|
+
- COVERAGE: 91.48% -- 5465/5974 lines in 47 files
|
|
37
|
+
- BRANCH COVERAGE: 75.95% -- 2059/2711 branches in 47 files
|
|
38
|
+
- 50.90% documented
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- Select the most recent GitHub Actions build when multiple runs exist for the same commit.
|
|
43
|
+
|
|
44
|
+
## [2.5.24] - 2026-08-07
|
|
45
|
+
|
|
46
|
+
- TAG: [v2.5.24][2.5.24t]
|
|
47
|
+
- COVERAGE: 91.79% -- 5480/5970 lines in 47 files
|
|
48
|
+
- BRANCH COVERAGE: 76.12% -- 2065/2713 branches in 47 files
|
|
49
|
+
- 50.90% documented
|
|
50
|
+
|
|
51
|
+
### Added
|
|
52
|
+
|
|
53
|
+
- GitHub releases can include published gem and checksum artifacts.
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
|
|
57
|
+
- Allow family orchestration to suppress per-member GitHub releases for monorepo release trains.
|
|
58
|
+
|
|
59
|
+
- Preserve successful GitHub release creation when the API response has no asset payload.
|
|
60
|
+
|
|
33
61
|
## [2.5.23] - 2026-08-07
|
|
34
62
|
|
|
35
63
|
- TAG: [v2.5.23][2.5.23t]
|
|
@@ -3307,7 +3335,11 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
3307
3335
|
- Selecting will run the selected workflow via `act`
|
|
3308
3336
|
- This may move to its own gem in the future.
|
|
3309
3337
|
|
|
3310
|
-
[Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.5.
|
|
3338
|
+
[Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.5.25...HEAD
|
|
3339
|
+
[2.5.25]: https://github.com/kettle-dev/kettle-dev/compare/v2.5.24...v2.5.25
|
|
3340
|
+
[2.5.25t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.5.25
|
|
3341
|
+
[2.5.24]: https://github.com/kettle-dev/kettle-dev/compare/v2.5.23...v2.5.24
|
|
3342
|
+
[2.5.24t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.5.24
|
|
3311
3343
|
[2.5.23]: https://github.com/kettle-dev/kettle-dev/compare/v2.5.22...v2.5.23
|
|
3312
3344
|
[2.5.23t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.5.23
|
|
3313
3345
|
[2.5.22]: https://github.com/kettle-dev/kettle-dev/compare/v2.5.21...v2.5.22
|
data/README.md
CHANGED
|
@@ -1007,7 +1007,7 @@ Thanks for RTFM. ☺️
|
|
|
1007
1007
|
[📌gitmoji]: https://gitmoji.dev
|
|
1008
1008
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
1009
1009
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
1010
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-5.
|
|
1010
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-5.974-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
1011
1011
|
[🔐security]: https://github.com/kettle-dev/kettle-dev/blob/main/SECURITY.md
|
|
1012
1012
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
1013
1013
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
data/exe/kettle-gh-release
CHANGED
|
@@ -39,7 +39,7 @@ end
|
|
|
39
39
|
# Do not guard with __FILE__ == $PROGRAM_NAME because binstubs use Kernel.load.
|
|
40
40
|
if ARGV.include?("-h") || ARGV.include?("--help")
|
|
41
41
|
puts <<~USAGE
|
|
42
|
-
Usage: #{script_basename} [--release-version VERSION|version=<VERSION>] [--check|--update] [--events] [--allow-unpublished]
|
|
42
|
+
Usage: #{script_basename} [--release-version VERSION|version=<VERSION>] [--asset PATH ...] [--check|--update] [--events] [--allow-unpublished]
|
|
43
43
|
|
|
44
44
|
Creates a GitHub release for a gem version.
|
|
45
45
|
|
|
@@ -54,6 +54,7 @@ if ARGV.include?("-h") || ARGV.include?("--help")
|
|
|
54
54
|
--update # Update an existing GitHub Release title/body from CHANGELOG.md
|
|
55
55
|
--events # Emit the final result as one NDJSON event
|
|
56
56
|
--allow-unpublished # Skip the RubyGems publication requirement (for intentionally non-RubyGems projects)
|
|
57
|
+
--asset PATH # Attach an artifact to the GitHub release (repeatable)
|
|
57
58
|
|
|
58
59
|
Environment:
|
|
59
60
|
GITHUB_TOKEN / GH_TOKEN # Required; needs repo:public_repo (classic) or contents:write scope
|
|
@@ -75,6 +76,16 @@ if check_only && update_only
|
|
|
75
76
|
end
|
|
76
77
|
events = ARGV.delete("--events")
|
|
77
78
|
allow_unpublished = ARGV.delete("--allow-unpublished")
|
|
79
|
+
assets = []
|
|
80
|
+
while (index = ARGV.index("--asset"))
|
|
81
|
+
asset = ARGV[index + 1].to_s.strip
|
|
82
|
+
if asset.empty?
|
|
83
|
+
warn("#{script_basename}: --asset requires a path")
|
|
84
|
+
exit 1
|
|
85
|
+
end
|
|
86
|
+
assets << asset
|
|
87
|
+
ARGV.slice!(index, 2)
|
|
88
|
+
end
|
|
78
89
|
version_arg = ARGV.find { |arg| arg.start_with?("version=") }
|
|
79
90
|
ARGV.delete(version_arg) if version_arg
|
|
80
91
|
explicit_version = version_arg&.split("=", 2)&.last&.strip
|
|
@@ -127,7 +138,7 @@ begin
|
|
|
127
138
|
created, message = if update_only
|
|
128
139
|
cli.send(:maybe_update_github_release!, version)
|
|
129
140
|
else
|
|
130
|
-
cli.send(:maybe_create_github_release!, version)
|
|
141
|
+
cli.send(:maybe_create_github_release!, version, assets: assets)
|
|
131
142
|
end
|
|
132
143
|
if events
|
|
133
144
|
puts JSON.generate(
|
|
@@ -106,14 +106,14 @@ module Kettle
|
|
|
106
106
|
# Scope to the exact commit SHA when available to avoid picking up a previous run on the same branch.
|
|
107
107
|
sha = head_sha || current_head_sha
|
|
108
108
|
data = github_get_json(
|
|
109
|
-
"https://api.github.com/repos/#{owner}/#{repo}/actions/workflows/#{workflow_file}/runs?branch=#{URI.encode_www_form_component(b)}&per_page=
|
|
109
|
+
"https://api.github.com/repos/#{owner}/#{repo}/actions/workflows/#{workflow_file}/runs?branch=#{URI.encode_www_form_component(b)}&per_page=100",
|
|
110
110
|
token: token
|
|
111
111
|
)
|
|
112
112
|
return unless data
|
|
113
113
|
|
|
114
114
|
runs = Array(data["workflow_runs"]) || []
|
|
115
|
-
#
|
|
116
|
-
#
|
|
115
|
+
# Match by head_sha first. There may be multiple builds for one commit;
|
|
116
|
+
# always select the most recent build rather than trusting API order.
|
|
117
117
|
run = if sha
|
|
118
118
|
match = preferred_head_run(runs.select { |r| r["head_sha"] == sha })
|
|
119
119
|
match ||= latest_repository_workflow_run(owner: owner, repo: repo, workflow_file: workflow_file, branch: b, head_sha: sha, token: token)
|
|
@@ -150,11 +150,17 @@ module Kettle
|
|
|
150
150
|
)
|
|
151
151
|
end
|
|
152
152
|
|
|
153
|
-
#
|
|
154
|
-
#
|
|
155
|
-
#
|
|
153
|
+
# GitHub can return multiple builds for the same commit, including an
|
|
154
|
+
# older failed run before a later retry. Select by run recency so an old
|
|
155
|
+
# conclusion cannot mask the newest build. `updated_at` also matters for
|
|
156
|
+
# reruns, which retain the original run's creation timestamp.
|
|
156
157
|
def preferred_head_run(runs)
|
|
157
|
-
runs.
|
|
158
|
+
runs.max_by do |run|
|
|
159
|
+
created_at = run["created_at"].to_s
|
|
160
|
+
updated_at = run["updated_at"].to_s
|
|
161
|
+
effective_at = [created_at, updated_at].max
|
|
162
|
+
[effective_at, run["run_number"].to_i, run["run_attempt"].to_i, run["id"].to_i]
|
|
163
|
+
end
|
|
158
164
|
end
|
|
159
165
|
|
|
160
166
|
def github_get_json(url, token:)
|
|
@@ -2355,7 +2355,12 @@ module Kettle
|
|
|
2355
2355
|
# If GITHUB_TOKEN is present, create a GitHub release for the given version tag.
|
|
2356
2356
|
# Title: v<version>
|
|
2357
2357
|
# Body: the CHANGELOG section for this version, followed by the two link references for this version.
|
|
2358
|
-
def maybe_create_github_release!(version)
|
|
2358
|
+
def maybe_create_github_release!(version, assets: [])
|
|
2359
|
+
if truthy_value?(ENV["KETTLE_RELEASE_SKIP_GITHUB_RELEASE"])
|
|
2360
|
+
message = "GitHub release creation disabled for this release context"
|
|
2361
|
+
puts "Skipping GitHub release creation: #{message}."
|
|
2362
|
+
return [true, message]
|
|
2363
|
+
end
|
|
2359
2364
|
token = github_token
|
|
2360
2365
|
if token.empty?
|
|
2361
2366
|
message = "GITHUB_TOKEN or GH_TOKEN is not set; skipping GitHub release creation. Set a token with repo:public_repo (classic) or contents:write scope."
|
|
@@ -2390,7 +2395,7 @@ module Kettle
|
|
|
2390
2395
|
|
|
2391
2396
|
tag = "v#{version}"
|
|
2392
2397
|
puts "Creating GitHub release #{owner}/#{repo} #{tag}..."
|
|
2393
|
-
ok, msg = github_create_release(owner: owner, repo: repo, token: token, tag: tag, title: tag, body: body)
|
|
2398
|
+
ok, msg = github_create_release(owner: owner, repo: repo, token: token, tag: tag, title: tag, body: body, assets: assets)
|
|
2394
2399
|
if ok
|
|
2395
2400
|
puts "GitHub release created for #{tag}."
|
|
2396
2401
|
else
|
|
@@ -2543,7 +2548,7 @@ module Kettle
|
|
|
2543
2548
|
|
|
2544
2549
|
# POST to GitHub Releases API
|
|
2545
2550
|
# Returns [ok(Boolean), message(String)]
|
|
2546
|
-
def github_create_release(owner:, repo:, token:, tag:, title:, body:)
|
|
2551
|
+
def github_create_release(owner:, repo:, token:, tag:, title:, body:, assets: [])
|
|
2547
2552
|
uri = URI("https://api.github.com/repos/#{owner}/#{repo}/releases")
|
|
2548
2553
|
req = Net::HTTP::Post.new(uri)
|
|
2549
2554
|
req["Accept"] = "application/vnd.github+json"
|
|
@@ -2563,7 +2568,12 @@ module Kettle
|
|
|
2563
2568
|
|
|
2564
2569
|
case res
|
|
2565
2570
|
when Net::HTTPSuccess, Net::HTTPCreated
|
|
2566
|
-
[true, "created"]
|
|
2571
|
+
return [true, "created"] if Array(assets).empty?
|
|
2572
|
+
|
|
2573
|
+
release = JSON.parse(res.body)
|
|
2574
|
+
asset_messages = Array(assets).map { |asset| github_upload_release_asset(release.fetch("id"), owner: owner, repo: repo, token: token, path: asset) }
|
|
2575
|
+
failed_asset = asset_messages.find { |ok, _message| !ok }
|
|
2576
|
+
failed_asset || [true, "created with #{asset_messages.length} assets"]
|
|
2567
2577
|
else
|
|
2568
2578
|
# If release already exists, treat as non-fatal
|
|
2569
2579
|
if res.code.to_s == "422" && res.body.to_s.include?("already_exists")
|
|
@@ -2576,6 +2586,26 @@ module Kettle
|
|
|
2576
2586
|
[false, "#{e.class}: #{e.message}"]
|
|
2577
2587
|
end
|
|
2578
2588
|
|
|
2589
|
+
def github_upload_release_asset(release_id, owner:, repo:, token:, path:)
|
|
2590
|
+
path = File.expand_path(path)
|
|
2591
|
+
return [false, "asset does not exist: #{path}"] unless File.file?(path)
|
|
2592
|
+
|
|
2593
|
+
uri = URI("https://uploads.github.com/repos/#{owner}/#{repo}/releases/#{release_id}/assets")
|
|
2594
|
+
uri.query = URI.encode_www_form(name: File.basename(path))
|
|
2595
|
+
req = Net::HTTP::Post.new(uri)
|
|
2596
|
+
req["Accept"] = "application/vnd.github+json"
|
|
2597
|
+
req["Authorization"] = "token #{token}"
|
|
2598
|
+
req["Content-Type"] = "application/octet-stream"
|
|
2599
|
+
req["User-Agent"] = "kettle-dev-release-cli"
|
|
2600
|
+
req.body = File.binread(path)
|
|
2601
|
+
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
|
|
2602
|
+
return [true, File.basename(path)] if res.is_a?(Net::HTTPSuccess) || res.is_a?(Net::HTTPCreated)
|
|
2603
|
+
|
|
2604
|
+
[false, "asset #{File.basename(path)}: HTTP #{res.code}: #{res.body}"]
|
|
2605
|
+
rescue => e
|
|
2606
|
+
[false, "asset #{File.basename(path)}: #{e.class}: #{e.message}"]
|
|
2607
|
+
end
|
|
2608
|
+
|
|
2579
2609
|
def github_update_release(owner:, repo:, token:, tag:, title:, body:)
|
|
2580
2610
|
lookup = URI("https://api.github.com/repos/#{owner}/#{repo}/releases/tags/#{tag}")
|
|
2581
2611
|
get = Net::HTTP::Get.new(lookup)
|
data/lib/kettle/dev/version.rb
CHANGED
|
@@ -5,7 +5,7 @@ module Kettle
|
|
|
5
5
|
# Version namespace for this gem.
|
|
6
6
|
module Version
|
|
7
7
|
# Current gem version.
|
|
8
|
-
VERSION = "2.5.
|
|
8
|
+
VERSION = "2.5.25"
|
|
9
9
|
end
|
|
10
10
|
# Current gem version exposed at the traditional constant location.
|
|
11
11
|
VERSION = Version::VERSION # Traditional Constant Location
|
data.tar.gz.sig
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
bL+�^L/�
|
|
2
|
+
ݼ�,��y/�I���k�^�;�j,3]��-�z�p���E�I��5�P�ҝ�o�12^�1I���E�oi~/C����CH��Q������T��8�Q�Y�z�
|
|
3
|
+
�����ޖ��j-w��ϯ���ܙe��B�����r���v
|
|
4
|
+
�R6"\���@~.cf�|���c�)���=��
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kettle-dev
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.5.
|
|
4
|
+
version: 2.5.25
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -402,10 +402,10 @@ licenses:
|
|
|
402
402
|
- AGPL-3.0-only
|
|
403
403
|
metadata:
|
|
404
404
|
homepage_uri: https://kettle-dev.galtzo.com
|
|
405
|
-
source_code_uri: https://github.com/kettle-dev/kettle-dev/tree/v2.5.
|
|
406
|
-
changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v2.5.
|
|
405
|
+
source_code_uri: https://github.com/kettle-dev/kettle-dev/tree/v2.5.25
|
|
406
|
+
changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v2.5.25/CHANGELOG.md
|
|
407
407
|
bug_tracker_uri: https://github.com/kettle-dev/kettle-dev/issues
|
|
408
|
-
documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.5.
|
|
408
|
+
documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.5.25
|
|
409
409
|
funding_uri: https://github.com/sponsors/pboling
|
|
410
410
|
wiki_uri: https://github.com/kettle-dev/kettle-dev/wiki
|
|
411
411
|
news_uri: https://www.railsbling.com/tags/kettle-dev
|
metadata.gz.sig
CHANGED
|
Binary file
|