Sha256: dae66e870a31e3d543b1b326962c162f24ec282bb8f7d120e30123b707d7fdf4

Contents?: true

Size: 917 Bytes

Versions: 41

Compression:

Stored size: 917 Bytes

Contents

# frozen_string_literal: true

require 'addressable'
require 'eac_ruby_utils/core_ext'
require 'avm/files/appendable'
require 'avm/files/deploy'
require 'avm/patches/object/template'

module Avm
  module Git
    class Commit
      class Deploy
        include ::Avm::Files::Appendable
        enable_simple_cache

        attr_reader :build_dir, :commit, :target_env, :target_path

        def initialize(commit, target_env, target_path)
          @commit = commit
          @target_env = target_env
          @target_path = target_path
        end

        def run
          fd = ::Avm::Files::Deploy.new(target_env, target_path)
          fd.append_tar_output_command(git_archive_command)
          fd.appended.push(*appended)
          fd.run
        end

        private

        def git_archive_command
          commit.git.command('archive', '--format=tar', commit.sha1)
        end
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
avm-tools-0.103.1 lib/avm/git/commit/deploy.rb
avm-tools-0.103.0 lib/avm/git/commit/deploy.rb
avm-tools-0.102.2 lib/avm/git/commit/deploy.rb
avm-tools-0.102.1 lib/avm/git/commit/deploy.rb
avm-tools-0.102.0 lib/avm/git/commit/deploy.rb
avm-tools-0.101.0 lib/avm/git/commit/deploy.rb
avm-tools-0.100.0 lib/avm/git/commit/deploy.rb
avm-tools-0.99.1 lib/avm/git/commit/deploy.rb
avm-tools-0.99.0 lib/avm/git/commit/deploy.rb
avm-tools-0.98.0 lib/avm/git/commit/deploy.rb
avm-tools-0.97.0 lib/avm/git/commit/deploy.rb
avm-tools-0.96.0 lib/avm/git/commit/deploy.rb
avm-tools-0.95.0 lib/avm/git/commit/deploy.rb
avm-tools-0.94.3 lib/avm/git/commit/deploy.rb
avm-tools-0.94.2 lib/avm/git/commit/deploy.rb
avm-tools-0.94.1 lib/avm/git/commit/deploy.rb
avm-tools-0.94.0 lib/avm/git/commit/deploy.rb
avm-tools-0.93.0 lib/avm/git/commit/deploy.rb
avm-tools-0.92.0 lib/avm/git/commit/deploy.rb
avm-tools-0.91.0 lib/avm/git/commit/deploy.rb