Class: Extension::Commands::Push

Inherits:
ExtensionCommand show all
Defined in:
lib/project_types/extension/commands/push.rb

Constant Summary collapse

TIME_DISPLAY_FORMAT =
"%B %d, %Y %H:%M:%S %Z"

Instance Attribute Summary

Attributes inherited from ShopifyCli::Command

#ctx, #options

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ExtensionCommand

#extension_type, #project

Methods inherited from ShopifyCli::Command

call, call_help, #initialize, options, prerequisite_task, run_prerequisites, subcommand, subcommand_registry

Methods included from ShopifyCli::Feature::Set

#hidden?, #hidden_feature

Constructor Details

This class inherits a constructor from ShopifyCli::Command

Class Method Details

.helpObject



19
20
21
22
23
24
# File 'lib/project_types/extension/commands/push.rb', line 19

def self.help
  "    Push the current extension to Shopify.\n      Usage: {{command:\#{ShopifyCli::TOOL_NAME} push}}\n  HELP\nend\n"

Instance Method Details

#call(args, name) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/project_types/extension/commands/push.rb', line 9

def call(args, name)
  Commands::Register.new(@ctx).call(args, name) unless project.registered?
  Commands::Build.new(@ctx).call(args, name)

  CLI::UI::Frame.open(@ctx.message('push.frame_title')) do
    updated_draft_version = update_draft
    show_message(updated_draft_version)
  end
end