Module: Dapp::Dimg::Dapp::Command::Stages::CleanupRepo

Included in:
Dapp
Defined in:
lib/dapp/dimg/dapp/command/stages/cleanup_repo.rb

Instance Method Summary collapse

Instance Method Details

#cleanup_repo_proper_cache_version_options_dumpObject



20
21
22
23
24
25
26
27
28
29
# File 'lib/dapp/dimg/dapp/command/stages/cleanup_repo.rb', line 20

def cleanup_repo_proper_cache_version_options_dump
  ruby2go_cleanup_common_repo_options.merge(ruby2go_cleanup_cache_version_options).merge(
    mode: {
      sync_repo: true,
      only_cache_version: true
   }
  ).tap do |data|
    break JSON.dump(data)
  end
end

#cleanup_repo_proper_repo_cache_optionsObject



31
32
33
34
35
36
37
38
39
# File 'lib/dapp/dimg/dapp/command/stages/cleanup_repo.rb', line 31

def cleanup_repo_proper_repo_cache_options
  ruby2go_cleanup_common_repo_options.merge(
    mode: {
      sync_repo: true
    }
  ).tap do |data|
    break JSON.dump(data)
  end
end

#repo_dimgstages_cleanupObject



16
17
18
# File 'lib/dapp/dimg/dapp/command/stages/cleanup_repo.rb', line 16

def repo_dimgstages_cleanup
  ruby2go_cleanup_command(:sync, cleanup_repo_proper_repo_cache_options)
end

#stages_cleanup_repoObject



7
8
9
10
11
12
13
14
# File 'lib/dapp/dimg/dapp/command/stages/cleanup_repo.rb', line 7

def stages_cleanup_repo
  lock_repo(repo = option_repo) do
    raise ::Dapp::Error::Command, code: :stages_cleanup_required_option unless stages_cleanup_option?

    ruby2go_cleanup_command(:sync, cleanup_repo_proper_cache_version_options_dump) if proper_cache_version?
    repo_dimgstages_cleanup if proper_repo_cache?
  end
end