Class: Teapot::Command::Clean

Inherits:
Samovar::Command
  • Object
show all
Defined in:
lib/teapot/command/clean.rb

Overview

A command to clean build artifacts.

Instance Method Summary collapse

Instance Method Details

#callObject

Delete build output directories for the specified targets or all targets.



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/teapot/command/clean.rb', line 15

def call
	context = parent.context
	logger = parent.logger
	configuration = context.configuration
	
	logger.info "Removing #{configuration.build_path}..."
	FileUtils.rm_rf configuration.build_path
	
	logger.info "Removing #{configuration.packages_path}..."
	FileUtils.rm_rf configuration.packages_path
end