Sha256: 0378bd6fe8d15a26bcfd48443e9ff34fbbac6203406e63d0c81c37fdea09aa72

Contents?: true

Size: 696 Bytes

Versions: 7

Compression:

Stored size: 696 Bytes

Contents

module Kamal::Commands::Builder::Clone
  extend ActiveSupport::Concern

  included do
    delegate :clone_directory, :build_directory, to: :"config.builder"
  end

  def clone
    git :clone, Kamal::Git.root, path: clone_directory
  end

  def clone_reset_steps
    [
      git(:remote, "set-url", :origin, Kamal::Git.root, path: build_directory),
      git(:fetch, :origin, path: build_directory),
      git(:reset, "--hard", Kamal::Git.revision, path: build_directory),
      git(:clean, "-fdx", path: build_directory)
    ]
  end

  def clone_status
    git :status, "--porcelain", path: build_directory
  end

  def clone_revision
    git :"rev-parse", :HEAD, path: build_directory
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
kamal-1.8.1 lib/kamal/commands/builder/clone.rb
kamal-1.8.0 lib/kamal/commands/builder/clone.rb
kamal-1.7.3 lib/kamal/commands/builder/clone.rb
kamal-1.7.2 lib/kamal/commands/builder/clone.rb
kamal-1.7.1 lib/kamal/commands/builder/clone.rb
kamal-1.7.0 lib/kamal/commands/builder/clone.rb
kamal-1.6.0 lib/kamal/commands/builder/clone.rb