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
eac_tools-0.38.0 sub/avm-git/lib/avm/git/commit/deploy.rb
eac_tools-0.37.2 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-git-0.8.0 lib/avm/git/commit/deploy.rb
eac_tools-0.37.1 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-git-0.7.0 lib/avm/git/commit/deploy.rb
eac_tools-0.37.0 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-git-0.6.0 lib/avm/git/commit/deploy.rb
eac_tools-0.36.1 sub/avm-git/lib/avm/git/commit/deploy.rb
eac_tools-0.36.0 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-git-0.5.0 lib/avm/git/commit/deploy.rb
eac_tools-0.35.0 sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.129.0 sub/avm-git/lib/avm/git/commit/deploy.rb
eac_tools-0.16.0 sub/avm-tools/sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.128.0 sub/avm-git/lib/avm/git/commit/deploy.rb
eac_tools-0.15.0 sub/avm-tools/sub/avm-git/lib/avm/git/commit/deploy.rb
eac_tools-0.14.0 sub/avm-tools/sub/avm-git/lib/avm/git/commit/deploy.rb
eac_tools-0.13.0 sub/avm-tools/sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.127.0 sub/avm-git/lib/avm/git/commit/deploy.rb
eac_tools-0.12.0 sub/avm-tools/sub/avm-git/lib/avm/git/commit/deploy.rb
avm-tools-0.126.0 sub/avm-git/lib/avm/git/commit/deploy.rb