Class: Phase::CLI::Build

Inherits:
Command show all
Defined in:
lib/phase/cli/build.rb

Instance Attribute Summary collapse

Attributes inherited from Command

#args, #options

Instance Method Summary collapse

Methods included from Util::Console

#ask, #fail, #log

Constructor Details

#initialize(args, options) ⇒ Build

Returns a new instance of Build.



24
25
26
27
28
# File 'lib/phase/cli/build.rb', line 24

def initialize(args, options)
  super
  @clean_build = !options.sandbox
  @version_number = options.version_number
end

Instance Attribute Details

#clean_buildObject (readonly)

Returns the value of attribute clean_build.



22
23
24
# File 'lib/phase/cli/build.rb', line 22

def clean_build
  @clean_build
end

Instance Method Details

#runObject



30
31
32
33
# File 'lib/phase/cli/build.rb', line 30

def run
  build = ::Phase::Deploy::Build.new(version_number, clean_build: clean_build)
  build.execute!
end