Module: Kamal::Commands::Builder::Clone
- Included in:
- Kamal::Commands::Builder
- Defined in:
- lib/kamal/commands/builder/clone.rb
Instance Method Summary collapse
- #clone ⇒ Object
- #clone_reset_steps ⇒ Object
- #clone_revision ⇒ Object
- #clone_status ⇒ Object
- #escaped_build_directory ⇒ Object
- #escaped_root ⇒ Object
Instance Method Details
#clone ⇒ Object
2 3 4 |
# File 'lib/kamal/commands/builder/clone.rb', line 2 def clone git :clone, escaped_root, "--recurse-submodules", path: config.builder.clone_directory.shellescape end |
#clone_reset_steps ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/kamal/commands/builder/clone.rb', line 6 def clone_reset_steps [ git(:remote, "set-url", :origin, escaped_root, path: escaped_build_directory), git(:fetch, :origin, path: escaped_build_directory), git(:reset, "--hard", Kamal::Git.revision, path: escaped_build_directory), git(:clean, "-fdx", path: escaped_build_directory), git(:submodule, :update, "--init", path: escaped_build_directory) ] end |
#clone_revision ⇒ Object
20 21 22 |
# File 'lib/kamal/commands/builder/clone.rb', line 20 def clone_revision git :"rev-parse", :HEAD, path: escaped_build_directory end |
#clone_status ⇒ Object
16 17 18 |
# File 'lib/kamal/commands/builder/clone.rb', line 16 def clone_status git :status, "--porcelain", path: escaped_build_directory end |
#escaped_build_directory ⇒ Object
28 29 30 |
# File 'lib/kamal/commands/builder/clone.rb', line 28 def escaped_build_directory config.builder.build_directory.shellescape end |