Sha256: 82c94dd5116554bf7016afe1bce76926fc97aff3087c0ca4ec2a87b05d627c61

Contents?: true

Size: 1.41 KB

Versions: 10

Compression:

Stored size: 1.41 KB

Contents

module ShopifyCLI
  module Commands
    class App
      class Deploy < ShopifyCLI::Command::AppSubCommand
        subcommand :Heroku, "heroku", "shopify_cli/commands/app/deploy/heroku"

        def call(args, _name)
          platform = args.shift
          case platform
          when "heroku"
            case detect_app
            when :rails
              Services::App::Deploy::Heroku::RailsService.call(
                context: @ctx
              )
            when :php
              Services::App::Deploy::Heroku::PHPService.call(
                context: @ctx
              )
            when :node
              Services::App::Deploy::Heroku::NodeService.call(
                context: @ctx
              )
            end
          when nil
            raise ShopifyCLI::Abort, @ctx.message(
              "core.app.deploy.error.missing_platform",
              ShopifyCLI::TOOL_NAME
            )
          else
            raise ShopifyCLI::Abort, @ctx.message(
              "core.app.deploy.error.invalid_platform",
              platform,
              ShopifyCLI::TOOL_NAME
            )
          end
        end

        def self.help
          ShopifyCLI::Context.message("core.app.deploy.help", ShopifyCLI::TOOL_NAME, ShopifyCLI::TOOL_NAME)
        end

        def self.extended_help
          ShopifyCLI::Context.message("core.app.deploy.extended_help", ShopifyCLI::TOOL_NAME)
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
shopify-cli-2.10.2 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.10.1 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.10.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.9.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.8.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.7.4 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.7.3 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.7.2 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.7.1 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.7.0 lib/shopify_cli/commands/app/deploy.rb