Class: Extension::Command::Push
Constant Summary
collapse
- TIME_DISPLAY_FORMAT =
"%B %d, %Y %H:%M:%S %Z"
Instance Attribute Summary
#ctx, #options
Class Method Summary
collapse
Instance Method Summary
collapse
call
call, call_help, check_node_version, check_ruby_version, check_version, #initialize, options, prerequisite_task, recommend_default_node_range, recommend_default_ruby_range, recommend_node, recommend_ruby, run_prerequisites, subcommand, subcommand_registry
#hidden?, #hidden_feature
Instance Method Details
#call(args, name) ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/project_types/extension/commands/push.rb', line 21
def call(args, name)
project = Extension::Loaders::Project.load(
context: @ctx,
directory: Dir.pwd,
api_key: options.flags[:api_key],
api_secret: options.flags[:api_secret],
registration_id: options.flags[:registration_id]
)
registration_id = options.flags[:registration_id]
check_registration(registration_id: registration_id, context: @ctx)
specification_handler = Extension::Loaders::SpecificationHandler.load(project: project, context: @ctx)
register_if_necessary(project: project, args: args, name: name)
Command::Build.new(@ctx).call(args, name) unless specification_handler.specification.options[:skip_build]
CLI::UI::Frame.open(@ctx.message("push.frame_title")) do
updated_draft_version = update_draft(project: project, specification_handler: specification_handler)
show_message(updated_draft_version, project: project)
end
end
|
#check_registration(registration_id:, context:) ⇒ Object
49
50
51
52
53
54
55
56
|
# File 'lib/project_types/extension/commands/push.rb', line 49
def check_registration(registration_id:, context:)
if !ShopifyCLI::Environment.interactive? && (!registration_id || registration_id.empty?)
message = context.message("errors.missing_push_options_ci", "--registration-id")
message += context.message("errors.missing_push_options_ci_solution", ShopifyCLI::TOOL_NAME)
raise ShopifyCLI::Abort,
message
end
end
|
#register_if_necessary(project:, args:, name:) ⇒ Object