Sha256: 07fedf7d141cc2766e87319b471b3aad82fceece9bb071746be3fbe798561d5e

Contents?: true

Size: 1.03 KB

Versions: 4

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

require 'avm/launcher/instances/runner_helper'

module Avm
  module Tools
    class Runner
      class Launcher
        class Instances < ::Avm::Launcher::Instances::RunnerHelper
          runner_with :help do
            desc 'Mostra informações sobre instâncias.'
            bool_opt '--recache', 'Rewrite instances cache.'
            bool_opt '--all', 'Get all instances.'
            pos_arg :instance_path, repeat: true, optional: true
          end

          def run
            ::EacLauncher::Context.current.recache = parsed.recache?
            instances.each { |i| show_instance(i) }
          end

          private

          def show_instance(instance)
            puts instance_label(instance)
            infov('  * Parent', (instance.parent ? instance_label(instance.parent) : '-'))
            infov('  * Git current revision', instance.options.git_current_revision)
            infov('  * Git publish remote', instance.options.git_publish_remote)
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
avm-tools-0.99.0 lib/avm/tools/runner/launcher/instances.rb
avm-tools-0.98.0 lib/avm/tools/runner/launcher/instances.rb
avm-tools-0.97.0 lib/avm/tools/runner/launcher/instances.rb
avm-tools-0.96.0 lib/avm/tools/runner/launcher/instances.rb