Sha256: c9774da6246ca53101d208dda8ec34cdee882499d986154812d95410dd04de7b

Contents?: true

Size: 879 Bytes

Versions: 78

Compression:

Stored size: 879 Bytes

Contents

# frozen_string_literal: true

require 'addressable'
require 'eac_ruby_utils/core_ext'
require 'avm/files/appendable'
require 'avm/files/deploy'

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

78 entries across 78 versions & 4 rubygems

Version Path
avm-tools-0.120.0 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.119.0 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.118.0 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.117.3 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.117.2 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.117.1 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-git-0.4.0 lib/avm/git/commit/deploy.rb
avm-tools-0.117.0 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.116.2 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.116.1 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.116.0 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.115.0 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.114.2 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.114.1 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-git-0.3.2 lib/avm/git/commit/deploy.rb
avm-tools-0.114.0 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-git-0.3.1 lib/avm/git/commit/deploy.rb
avm-tools-0.113.6 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.113.5 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.113.4 sub/avm-git/lib/avm/git/commit/deploy.rb