Class: Avm::Projects::Stereotypes::Git::Update

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/projects/stereotypes/git/update.rb,
lib/avm/projects/stereotypes/git/update/subrepo.rb

Defined Under Namespace

Classes: Subrepo

Instance Method Summary collapse

Instance Method Details

#clean_allObject



33
34
35
36
# File 'lib/avm/projects/stereotypes/git/update.rb', line 33

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

#runObject



18
19
20
21
22
23
24
25
26
# File 'lib/avm/projects/stereotypes/git/update.rb', line 18

def run
  clean_all
  selected_subrepos.map do |f|
    infov 'Subrepo', f
    ::EacRubyUtils::Speaker.context.on(::EacCli::Speaker.new(err_line_prefix: '  ')) do
      ::Avm::Projects::Stereotypes::Git::Update::Subrepo.new(self, f).run
    end
  end
end

#selected_subrepos_uncachedObject



28
29
30
31
# File 'lib/avm/projects/stereotypes/git/update.rb', line 28

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