Sha256: d83fc343f44fd16b3c396ea8b3236be6848f4f6c9e0d4c0efb7ed96420996014
Contents?: true
Size: 1.48 KB
Versions: 2
Compression:
Stored size: 1.48 KB
Contents
# frozen_string_literal: true module Script module Layers module Application class BuildScript class << self def call(ctx:, task_runner:, script_project:, config_ui:) CLI::UI::Frame.open(ctx.message("script.application.building")) do begin UI::StrictSpinner.spin(ctx.message("script.application.building_script")) do |spinner| Infrastructure::PushPackageRepository.new(ctx: ctx).create_push_package( script_project: script_project, script_content: task_runner.build, compiled_type: task_runner.compiled_type, metadata: task_runner.metadata, config_ui: config_ui, ) spinner.update_title(ctx.message("script.application.built")) end rescue StandardError => e CLI::UI::Frame.with_frame_color_override(:red) do ctx.puts("\n{{red:#{e.message}}}") end errors = [ Infrastructure::Errors::InvalidBuildScriptError, Infrastructure::Errors::BuildScriptNotFoundError, Infrastructure::Errors::WebAssemblyBinaryNotFoundError, ] raise Infrastructure::Errors::BuildError unless errors.any? { |err| e.is_a?(err) } raise end end end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shopify-cli-1.8.0 | lib/project_types/script/layers/application/build_script.rb |
shopify-cli-1.7.1 | lib/project_types/script/layers/application/build_script.rb |