Class Bee::Build
In: lib/bee.rb
Parent: Object

Class for a build. This class is built from an object resulting from YAML build file parsing.

Methods

evaluate_properties   load   new   run  

Included Modules

Bee::Util::BuildErrorMixin Bee::Util::HashCheckerMixin

Constants

KEY = 'build'   Build key.
DESCRIPTION = { 'build' => :mandatory, 'default' => :optional, 'description' => :optional, 'context' => :optional, 'extends' => :optional}   Build entry description.

Attributes

base  [R]  Base directory, that is directory where lives the build file.
context  [R]  Context for Ruby scripts and properties.
default  [RW]  Default target, specified with default entry or fist target in build file.
description  [R]  Build description.
extends  [R]  Parent build.
file  [R]  Build file.
here  [R]  Current directory, where was started the script.
listener  [R]  Build listener, responsible for displaying build status.
name  [R]  Build name.
package_manager  [R]  Package manager, for task invocation.
properties  [R]  Build properties.
targets  [R]  Hash for targets, indexed by target name.

Public Class methods

Load a build from a YAML build file.

  • file: YAML build file or URL.
  • recursive: tells if we look for build file recursively (defaults to nil).
  • properties: a hash of additional properties passed on command line.

Constructor:

  • object: object tree resulting from YAML build file parsing.
  • file: build file (nil if none).
  • properties: a hash of additional properties passed on command line.
  • here: current directory.

Public Instance methods

Evaluate properties.

Run build:

  • targets: list of targets to run.
  • listener: listener for the build.

[Validate]