module Luban::Deployment::Command::Tasks::Provision

Constants

Actions

Public Instance Methods

provision_tasks() click to toggle source
# File lib/luban/deployment/cli/command.rb, line 16
def provision_tasks; commands[:provision].commands; end
provisionable?() click to toggle source
# File lib/luban/deployment/cli/command.rb, line 14
def provisionable?; true; end

Protected Instance Methods

setup_provision_tasks() click to toggle source
# File lib/luban/deployment/cli/command.rb, line 20
def setup_provision_tasks
  _self = self
  command :provision do
    desc "Run provision tasks"

    task :setup do
      desc "Setup #{_self.display_name} environment"
      action! :setup
    end

    task :build do
      desc "Build #{_self.display_name} environment"
      switch :force, "Force to build", short: :f
      action! :build
    end

    task :destroy do
      desc "Destroy #{_self.display_name} environment"
      switch :force, "Force to destroy", short: :f, required: true
      action! :destroy
    end

    task :cleanup do
      desc "Clean up temporary files during installation"
      action! :cleanup
    end

    task :binstubs do
      desc "Update binstubs/symlinks for required packages"
      switch :force, "Force to update binstubs/symlinks", short: :f
      action! :binstubs
    end

    task :version do
      desc "Show current version for app/required packages"
      action! :show_current
    end

    task :versions do
      desc "Show app/package installation summary"
      action! :show_summary
    end

    task :which do
      desc "Show the real path for the given executable"
      argument :executable, "Executable to which"
      action! :which
    end

    task :whence do
      desc "List packages with the given executable"
      argument :executable, "Executable to whence"
      action! :whence
    end
  end
end