Sha256: 93c464bd72d83225a486205421365c1cb957a1eca72e93968f2a934db40472d9
Contents?: true
Size: 1.74 KB
Versions: 11
Compression:
Stored size: 1.74 KB
Contents
# -*- coding: UTF-8 -*- require 'mj/tools/subprocess' require 'build-tool/application' require 'build-tool/commands' module BuildTool; module Commands; class CtagsError < BuildTool::Error; end # # BuildCommand # class Fetch < ModuleBasedCommand include MJ::Tools::SubProcess name "fetch" description "fetch remote changes (if applicable)" long_description [ "Invoke the fetch phase for the given modules. It depends on the modules", "VCS if this command has any effect." ] # Log this command if $noop is not active def log? ! $noop end def applicable? BuildTool::Application.instance.has_recipe? end def initialize_options options.banner = "Usage: #{self.fullname} [OPTIONS]... MODULES..." options.separator( "" ) options.separator( "Options" ) super end def is_module_ready?( mod ) isready = true isready &= mod.ready_for_fetch if isready && !mod.vcs_required.fetching_supported? warn( "#{mod.name}: fetching not supported by #{mod.vcs.name} -> implicit rebase." ) end return isready end def do_execute_module( mod ) if mod.checkedout? fetch( mod ) else clone( mod ) end end def teardown_command cleanup_after_vcs_access end def prepare_module( mod ) isready = true isready &= mod.prepare_for_fetch return isready end # prepare_module end # class Build end; end # module BuildTool::Commands
Version data entries
11 entries across 11 versions & 1 rubygems