Sha256: 9d3f2c25f18851c1f07f92fe1e613b74f23bbfb33f897523560d3955071c72df
Contents?: true
Size: 1.29 KB
Versions: 16
Compression:
Stored size: 1.29 KB
Contents
# frozen_string_literal: true module Script module Layers module Application class BuildScript class << self def call(ctx:, task_runner:, script:) return if CLI::UI::Frame.open(ctx.message('script.application.building')) do begin UI::StrictSpinner.spin(ctx.message('script.application.building_script')) do |spinner| build(ctx, task_runner, script) spinner.update_title(ctx.message('script.application.built')) end true rescue StandardError => e CLI::UI::Frame.with_frame_color_override(:red) do ctx.puts("\n{{red:#{e.message}}}") end false end end raise Infrastructure::Errors::BuildError end private def build(ctx, task_runner, script) script_repo = Infrastructure::ScriptRepository.new(ctx: ctx) script_content = script_repo.with_temp_build_context do task_runner.build end Infrastructure::PushPackageRepository.new(ctx: ctx) .create_push_package(script, script_content, task_runner.compiled_type) end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems