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.



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

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

Instance Method Details

#executeObject



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

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