Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.1.0.alpha.6 - 2026-08-28

- Run `bin/rails boring:build` as a standalone builder process so Dagger can
preserve the command, streaming progress, signals, and cleanup.

## 0.1.0.alpha.5 - 2026-08-28

- Record the exact local or BoringCache build result for deployment tools.
Expand Down
3 changes: 1 addition & 2 deletions lib/boringbuilder/tasks/boring.rake
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ namespace :boring do
end

command << Rails.root.to_s
status = BoringBuilder::CLI.start(command)
raise BoringBuilder::BuildError, "BoringBuilder exited unsuccessfully" unless status.zero?
Kernel.exec(Gem.ruby, Gem.bin_path("boringbuilder", "boringbuilder"), *command)
end

desc "Check the configured container runtime"
Expand Down
2 changes: 1 addition & 1 deletion lib/boringbuilder/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module BoringBuilder
VERSION = "0.1.0.alpha.5"
VERSION = "0.1.0.alpha.6"
end
24 changes: 11 additions & 13 deletions test/boringbuilder/rake_task_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,33 @@ def test_exposes_the_rails_shaped_build_task

def test_builds_the_rails_application
calls = []
start = lambda do |arguments|
calls << arguments
0
end
executable = Gem.bin_path("boringbuilder", "boringbuilder")

with_environment("BORINGBUILDER_RUNTIME" => "docker", "BORINGBUILDER_OUTPUT" => "dist/app.tar.zst") do
with_rails_root do
with_cli_start(start) do
with_kernel_exec(->(*arguments) { calls << arguments }) do
Rake::Task["boring:build"].invoke
end
end
end

assert_equal [
["build", "--runtime", "docker", "--output", "dist/app.tar.zst", Pathname.pwd.to_s]
[Gem.ruby, executable, "build", "--runtime", "docker", "--output", "dist/app.tar.zst",
Pathname.pwd.to_s]
], calls
end

private

def with_cli_start(replacement)
singleton_class = BoringBuilder::CLI.singleton_class
original = BoringBuilder::CLI.method(:start)
singleton_class.send(:remove_method, :start)
singleton_class.define_method(:start, replacement)
def with_kernel_exec(replacement)
singleton_class = Kernel.singleton_class
original = Kernel.method(:exec)
singleton_class.send(:remove_method, :exec)
singleton_class.define_method(:exec, replacement)
yield
ensure
singleton_class.send(:remove_method, :start)
singleton_class.define_method(:start, original)
singleton_class.send(:remove_method, :exec)
singleton_class.define_method(:exec, original)
end

def with_environment(values)
Expand Down