Class: Phase::Deploy::Build
- Inherits:
-
Object
- Object
- Phase::Deploy::Build
- Includes:
- Util::Shell
- Defined in:
- lib/phase/kit/deploy/build.rb
Instance Attribute Summary collapse
-
#build_dir ⇒ Object
readonly
Returns the value of attribute build_dir.
-
#clean_build ⇒ Object
readonly
Returns the value of attribute clean_build.
-
#version_tag ⇒ Object
readonly
Returns the value of attribute version_tag.
Instance Method Summary collapse
- #execute! ⇒ Object
-
#initialize(version_tag, options = {}) ⇒ Build
constructor
A new instance of Build.
Methods included from Util::Shell
Methods included from Util::Console
Constructor Details
#initialize(version_tag, options = {}) ⇒ Build
Returns a new instance of Build.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/phase/kit/deploy/build.rb', line 9 def initialize(version_tag, = {}) @clean_build = .fetch(:clean_build, true) @version_tag = version_tag if clean_build @build_dir = ::Pathname.new( .fetch(:build_dir, "build") ) else @build_dir = ::Pathname.new(".") end end |
Instance Attribute Details
#build_dir ⇒ Object (readonly)
Returns the value of attribute build_dir.
7 8 9 |
# File 'lib/phase/kit/deploy/build.rb', line 7 def build_dir @build_dir end |
#clean_build ⇒ Object (readonly)
Returns the value of attribute clean_build.
7 8 9 |
# File 'lib/phase/kit/deploy/build.rb', line 7 def clean_build @clean_build end |
#version_tag ⇒ Object (readonly)
Returns the value of attribute version_tag.
7 8 9 |
# File 'lib/phase/kit/deploy/build.rb', line 7 def version_tag @version_tag end |
Instance Method Details
#execute! ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/phase/kit/deploy/build.rb', line 20 def execute! prepare_environment build_assets commit_new_version! build_image push end |