Sha256: 7eb98e101fb2a726201a3cffbabba803b35dbda3c4e64d5219fa27adc3caacf7

Contents?: true

Size: 1.07 KB

Versions: 6

Compression:

Stored size: 1.07 KB

Contents

module Minke
  module Tasks
    class Fetch < Task

      def run args = nil
        puts "## Update dependencies"

        puts '### Install gems'
        rvm = "#{ENV['HOME']}/.rvm/scripts/rvm"
        rvm_root = '/usr/local/rvm/scripts/rvm'

        rvm_installed = @shell_helper.exist?(rvm)
        rvm_root_installed = @shell_helper.exist?(rvm_root)

        gemset = @shell_helper.read_file '.ruby-gemset'

        puts "Using gemset #{gemset}" 

        rvm_command = "source #{rvm} && rvm gemset use #{gemset} && " if rvm_installed
        rvm_command = "source #{rvm_root} && rvm gemset use #{gemset} && " if rvm_root_installed 

        @shell_helper.execute("/bin/bash -c '#{rvm_command}bundle install -j3 && bundle update'")

        puts '### Install generator dependencies'
        
        if @generator_config.build_settings.build_commands.fetch != nil
          run_with_block do
            @generator_config.build_settings.build_commands.fetch.each do |command|
              run_command_in_container command
            end
          end
        end
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
minke-1.12.5 lib/minke/tasks/fetch.rb
minke-1.12.4 lib/minke/tasks/fetch.rb
minke-1.12.3 lib/minke/tasks/fetch.rb
minke-1.12.2 lib/minke/tasks/fetch.rb
minke-1.12.0 lib/minke/tasks/fetch.rb
minke-1.11.9 lib/minke/tasks/fetch.rb