Sha256: 0eb8bfe43aa14bc893481e16d594819f34e24042d99c16cc016ab9c97eb7c73c
Contents?: true
Size: 1.09 KB
Versions: 11
Compression:
Stored size: 1.09 KB
Contents
# frozen_string_literal: true module Theme module Commands class Deploy < ShopifyCli::Command prerequisite_task :ensure_themekit_installed options do |parser, flags| parser.on("--env=ENV") { |env| flags[:env] = env } parser.on("--allow-live") { flags["allow_live"] = true } end def call(*) CLI::UI::Frame.open(@ctx.message("theme.deploy.deploying")) do unless CLI::UI::Prompt.confirm(@ctx.message("theme.deploy.confirmation")) @ctx.abort(@ctx.message("theme.deploy.abort")) end if options.flags[:env] env = options.flags[:env] options.flags.delete(:env) end flags = Themekit.add_flags(options.flags) unless Themekit.deploy(@ctx, flags: flags, env: env) @ctx.abort(@ctx.message("theme.deploy.error")) end end @ctx.done(@ctx.message("theme.deploy.info.deployed")) end def self.help ShopifyCli::Context.message("theme.deploy.help", ShopifyCli::TOOL_NAME, ShopifyCli::TOOL_NAME) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems