Class: Dply::Strategy::Git
- Inherits:
-
Object
- Object
- Dply::Strategy::Git
- Extended by:
- Forwardable
- Includes:
- Helper
- Defined in:
- lib/dply/strategy/git.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #deploy ⇒ Object
-
#initialize(config, options) ⇒ Git
constructor
A new instance of Git.
- #reload ⇒ Object
Methods included from Helper
#cmd, #error, #git, #logger, #sh, #symlink
Constructor Details
#initialize(config, options) ⇒ Git
Returns a new instance of Git.
18 19 20 21 |
# File 'lib/dply/strategy/git.rb', line 18 def initialize(config, ) @config = config = || {} end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
14 15 16 |
# File 'lib/dply/strategy/git.rb', line 14 def config @config end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
14 15 16 |
# File 'lib/dply/strategy/git.rb', line 14 def end |
Instance Method Details
#deploy ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/dply/strategy/git.rb', line 23 def deploy deploy_target = (target || :git) setup.git Dir.chdir current_dir do previous_version = git.commit_id git_step current_version = git.commit_id link_all install_pkgs bundle.install(without: config.bundler_without) bundle.clean util.run "deploy:#{deploy_target}", render_config: true util.report_changes(previous_version, current_version) end end |
#reload ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/dply/strategy/git.rb', line 40 def reload Dir.chdir current_dir do link_all util.run :reload, render_config: true end end |