Sha256: 9ed550ff95860cbf3e2c5130584cb6527c695f1325fe4a20975cc0e57a0eb857
Contents?: true
Size: 1.27 KB
Versions: 9
Compression:
Stored size: 1.27 KB
Contents
require 'thor' module Hako class CLI < Thor desc 'deploy FILE', 'Run deployment' option :force, aliases: %w[-f], type: :boolean, default: false, desc: 'Run deployment even if nothing is changed' option :tag, aliases: %w[-t], type: :string, default: 'latest', desc: 'Specify tag (default: latest)' def deploy(yaml_path) require 'hako/application' require 'hako/commander' Commander.new(Application.new(yaml_path)).deploy(force: options[:force], tag: options[:tag]) end desc 'oneshot FILE COMMAND ARG...', 'Run oneshot task' option :tag, aliases: %w[-t], type: :string, default: 'latest', desc: 'Specify tag (default: latest)' def oneshot(yaml_path, command, *args) require 'hako/application' require 'hako/commander' Commander.new(Application.new(yaml_path)).oneshot([command, *args], tag: options[:tag]) end desc 'status FILE', 'Show deployment status' def status(yaml_path) require 'hako/application' require 'hako/commander' Commander.new(Application.new(yaml_path)).status end desc 'remove FILE', 'Destroy the application' def remove(yaml_path) require 'hako/application' require 'hako/commander' Commander.new(Application.new(yaml_path)).remove end end end
Version data entries
9 entries across 9 versions & 1 rubygems