Sha256: d738135b022b069769d7c0c570f653a4f893947068da312739c927e585d32810

Contents?: true

Size: 1.06 KB

Versions: 92

Compression:

Stored size: 1.06 KB

Contents

# frozen_string_literal: true

require 'avm/files/appendable'
require 'avm/files/deploy'
require 'avm/scms/base'
require 'avm/scms/commit'
require 'eac_ruby_utils/core_ext'

module Avm
  module Git
    module Scms
      class Git < ::Avm::Scms::Base
        class Commit < ::Avm::Scms::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_repo.command('archive', '--format=tar', commit.id)
            end
          end
        end
      end
    end
  end
end

Version data entries

92 entries across 92 versions & 2 rubygems

Version Path
avm-git-0.18.0 lib/avm/git/scms/git/commit/deploy.rb
eac_tools-0.94.0 sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb
avm-git-0.17.0 lib/avm/git/scms/git/commit/deploy.rb
eac_tools-0.86.5 sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb
avm-git-0.16.0 lib/avm/git/scms/git/commit/deploy.rb
eac_tools-0.86.4 sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb
eac_tools-0.86.3 sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb
avm-git-0.15.0 lib/avm/git/scms/git/commit/deploy.rb
eac_tools-0.86.2 sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb
eac_tools-0.84.0 sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb
eac_tools-0.83.0 sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb
eac_tools-0.82.0 sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb
avm-git-0.14.0 lib/avm/git/scms/git/commit/deploy.rb
eac_tools-0.81.0 sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb
eac_tools-0.80.0 sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb
eac_tools-0.79.0 sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb
eac_tools-0.78.0 sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb
eac_tools-0.77.1 sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb
eac_tools-0.77.0 sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb
eac_tools-0.76.1 sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb