Sha256: 06e79c9716efadb02fe9d8b4b1dc246df304397f43777d40f97f6d449ae20736

Contents?: true

Size: 1.05 KB

Versions: 17

Compression:

Stored size: 1.05 KB

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'
require 'avm/patches/class/i18n'

module Avm
  module Projects
    module Stereotypes
      class Git
        class Update
          require_sub __FILE__
          enable_simple_cache
          enable_console_speaker
          common_constructor :instance

          delegate :git_repo, to: :instance

          def run
            clean_all
            selected_subrepos.map do |f|
              infov 'Subrepo', f
              on_speaker_node do |node|
                node.stderr_line_prefix = '  '
                ::Avm::Projects::Stereotypes::Git::Update::Subrepo.new(self, f).run
              end
            end
          end

          def selected_subrepos_uncached
            git_repo.command('subrepo', '-q', 'status').execute!.split("\n").map(&:strip)
                    .select(&:present?).map(&:to_pathname)
          end

          def clean_all
            infom 'Cleaning'
            git_repo.command('subrepo', 'clean', '--all').execute!
          end
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
avm-tools-0.98.0 lib/avm/projects/stereotypes/git/update.rb
avm-tools-0.97.0 lib/avm/projects/stereotypes/git/update.rb
avm-tools-0.96.0 lib/avm/projects/stereotypes/git/update.rb
avm-tools-0.95.0 lib/avm/projects/stereotypes/git/update.rb
avm-tools-0.94.3 lib/avm/projects/stereotypes/git/update.rb
avm-tools-0.94.2 lib/avm/projects/stereotypes/git/update.rb
avm-tools-0.94.1 lib/avm/projects/stereotypes/git/update.rb
avm-tools-0.94.0 lib/avm/projects/stereotypes/git/update.rb
avm-tools-0.93.0 lib/avm/projects/stereotypes/git/update.rb
avm-tools-0.92.0 lib/avm/projects/stereotypes/git/update.rb
avm-tools-0.91.0 lib/avm/projects/stereotypes/git/update.rb
avm-tools-0.90.0 lib/avm/projects/stereotypes/git/update.rb
avm-tools-0.89.0 lib/avm/projects/stereotypes/git/update.rb
avm-tools-0.88.0 lib/avm/projects/stereotypes/git/update.rb
avm-tools-0.87.1 lib/avm/projects/stereotypes/git/update.rb
avm-tools-0.87.0 lib/avm/projects/stereotypes/git/update.rb
avm-tools-0.86.0 lib/avm/projects/stereotypes/git/update.rb