Sha256: d3e342426a5e67fdd3c38191b80469cea0b677ce28303d6fafa207bf43cdefbe

Contents?: true

Size: 1.42 KB

Versions: 34

Compression:

Stored size: 1.42 KB

Contents

module ShopifyCLI
  module Commands
    class App
      class Deploy < ShopifyCLI::Command::AppSubCommand
        prerequisite_task :ensure_git_dependency

        recommend_default_ruby_range

        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

34 entries across 34 versions & 1 rubygems

Version Path
shopify-cli-2.36.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.35.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.34.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.33.1 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.33.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.32.1 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.32.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.31.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.30.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.29.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.28.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.27.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.26.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.25.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.24.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.23.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.22.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.21.0 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.20.1 lib/shopify_cli/commands/app/deploy.rb
shopify-cli-2.20.0 lib/shopify_cli/commands/app/deploy.rb