More expansive info on builder

This commit is contained in:
David Heinemeier Hansson
2023-01-13 10:28:46 +01:00
parent e85c8161df
commit fd5172266e
4 changed files with 12 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
require "mrsk/commands/base"
class Mrsk::Commands::Builder < Mrsk::Commands::Base
delegate :create, :remove, :push, :pull, to: :target
delegate :create, :remove, :push, :pull, :info, to: :target
delegate :native?, :multiarch?, :remote?, to: :name
def name

View File

@@ -16,4 +16,10 @@ class Mrsk::Commands::Builder::Multiarch < Mrsk::Commands::Base
def pull
docker :pull, config.absolute_image
end
def info
combine \
docker(:context, :ls),
docker(:buildx, :ls)
end
end

View File

@@ -18,4 +18,8 @@ class Mrsk::Commands::Builder::Native < Mrsk::Commands::Base
def pull
docker :pull, config.absolute_image
end
def info
# No-op on native
end
end

View File

@@ -45,6 +45,7 @@ namespace :mrsk do
task :info do
run_locally do
puts "Builder: #{MRSK.builder.name} (#{MRSK.builder.target.class.name})"
puts capture(*MRSK.builder.info)
end
end
end