Sha256: b9ced52164e00fbc6cb07c89ce6c20ce3423010a3e653aeb3a047a1b365bddf3

Contents?: true

Size: 1.12 KB

Versions: 5

Compression:

Stored size: 1.12 KB

Contents

require 'build-tool/application'
require 'build-tool/commands'

module BuildTool; module Commands;

    class CtagsError < BuildTool::Error; end
    #
    # BuildCommand
    #
    class Rebase < ModuleBasedCommand

        include MJ::Tools::SubProcess

        name        "rebase"
        description "rebase local checkout against previously fetched remote changes."

        def applicable?
            BuildTool::Application.instance.name != "build-tool"
        end

        def is_module_ready?( mod )
            isready = true
            if !mod.checkedout?
                logger.warn "#{mod.name}: module not checked out -> skipping."
            end
            if !mod.vcs.fetching_supported?
                logger.warn "#{mod.name}: fetching not support by #{mod.vcs.name} -> will have no effect."
            end
            return isready
        end


        def do_execute_module( mod )
            if mod.checkedout?
                mod.rebase( @log_directory )
            else
                logger.info "Not checked out. Skipping"
            end
        end

    end # class Build

end; end # module BuildTool::Commands



Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
build-tool-0.1.4 lib/build-tool/commands/rebase.rb
build-tool-0.1.3 lib/build-tool/commands/rebase.rb
build-tool-0.1.2 lib/build-tool/commands/rebase.rb
build-tool-0.1.0 lib/build-tool/commands/rebase.rb
build-tool-0.1.1 lib/build-tool/commands/rebase.rb