Class: Minke::Tasks::Fetch

Inherits:
Task
  • Object
show all
Defined in:
lib/minke/tasks/fetch.rb

Instance Method Summary collapse

Methods inherited from Task

#create_container_image, #create_working_directory, #initialize, #run_command_in_container, #run_with_block

Constructor Details

This class inherits a constructor from Minke::Tasks::Task

Instance Method Details

#run(args = nil) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/minke/tasks/fetch.rb', line 5

def run args = nil
  @logger.info '### Fetching dependencies'

  if @generator_config.build_settings.build_commands.fetch != nil
    run_with_block do |pre_tasks, post_tasks|
      pre_tasks.call
      
      @generator_config.build_settings.build_commands.fetch.each do |command|
        run_command_in_container command
      end

      post_tasks.call
    end
  end
end