Class: Avm::EacRedmineBase0::CoreUpdate

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/eac_redmine_base0/core_update.rb

Constant Summary collapse

GITIGNORE_ADD =
%w[/public/assets/**/* /config/install.sh /log/**/*].freeze
GITIGNORE_DEL =
%w[/Gemfile.lock /plugins/* /public/themes/*].freeze
TARGET_KEEP =
%w[/Gemfile.lock].freeze

Instance Method Summary collapse

Instance Method Details

#assert_source_packageObject



32
33
34
35
36
37
# File 'lib/avm/eac_redmine_base0/core_update.rb', line 32

def assert_source_package
  infom 'Asserting source package...'
  source_package.assert
  infov 'Package cache path', source_package.path
  infov 'Package size', source_package.path.size
end

#runObject



19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/avm/eac_redmine_base0/core_update.rb', line 19

def run
  ::EacRubyUtils::Fs::Temp.on_directory do |dir|
    @tempdir = dir
    assert_source_package
    extract_package_to_tempdir
    sync_content
    change_git_ignore
    validate_empty_dir
  end
  git_commit
  success 'Done!'
end