Class: BuildTool::ModuleActions::RemoveBuildDirectory

Inherits:
Base
  • Object
show all
Defined in:
lib/build-tool/command_actions.rb

Instance Method Summary collapse

Methods inherited from Base

#do

Constructor Details

#initialize(command, mod, force = false) ⇒ RemoveBuildDirectory

Returns a new instance of RemoveBuildDirectory.



154
155
156
157
# File 'lib/build-tool/command_actions.rb', line 154

def initialize( command, mod, force = false )
    @force = force
    super( command, 10, :clean, mod )
end

Instance Method Details

#executeObject



159
160
161
162
163
164
165
166
# File 'lib/build-tool/command_actions.rb', line 159

def execute()
    if @module.build_system_required.out_of_source or @force
        logger.info "Removing build directory"
        @module.remove_build_directory
    else
        logger.warn "In source build. Will not remove source directory!"
    end
end