Various code style improvements

This commit is contained in:
Igor Alexandrov
2023-06-18 23:39:44 +04:00
parent aa28ee0f3e
commit dadd8225da
6 changed files with 54 additions and 42 deletions

View File

@@ -22,17 +22,17 @@ class Mrsk::Commands::Builder::Multiarch::Remote < Mrsk::Commands::Builder::Mult
end
def create_local_buildx
docker :buildx, :create, "--name", builder_name, builder_name_with_arch(config.builder.local_arch), "--platform", "linux/#{config.builder.local_arch}"
docker :buildx, :create, "--name", builder_name, builder_name_with_arch(local_arch), "--platform", "linux/#{local_arch}"
end
def append_remote_buildx
docker :buildx, :create, "--append", "--name", builder_name, builder_name_with_arch(config.builder.remote_arch), "--platform", "linux/#{config.builder.remote_arch}"
docker :buildx, :create, "--append", "--name", builder_name, builder_name_with_arch(remote_arch), "--platform", "linux/#{remote_arch}"
end
def create_contexts
combine \
create_context(config.builder.local_arch, config.builder.local_host),
create_context(config.builder.remote_arch, config.builder.remote_host)
create_context(local_arch, local_host),
create_context(remote_arch, remote_host)
end
def create_context(arch, host)
@@ -41,8 +41,8 @@ class Mrsk::Commands::Builder::Multiarch::Remote < Mrsk::Commands::Builder::Mult
def remove_contexts
combine \
remove_context(config.builder.local_arch),
remove_context(config.builder.remote_arch)
remove_context(local_arch),
remove_context(remote_arch)
end
def remove_context(arch)