Sha256: 65488068c82f99c66a8d4cf90ebd715f581938aea30b00dea9f46321819ec12a

Contents?: true

Size: 1.25 KB

Versions: 10

Compression:

Stored size: 1.25 KB

Contents

# frozen_string_literal: true

require 'avm/files/appender'
require 'avm/files/deploy'
require 'eac_ruby_utils/envs'
require 'eac_ruby_utils/fs/temp'

module Avm
  module EacWebappBase0
    module Instances
      class Deploy
        module Build
          private

          attr_accessor :build_dir

          def append_instance_content
            ::Avm::Files::Appender
              .new
              .variables_source_set(variables_source)
              .append_templatized_directory(template.path)
              .append_templatized_directories(appended_directories)
              .append_file_content(version_target_path, version)
              .write_appended_on(build_dir)
          end

          def build_dir_env
            ::EacRubyUtils::Envs.local
          end

          def create_build_dir
            self.build_dir = ::EacRubyUtils::Fs::Temp.directory
          end

          def remove_build_dir
            build_dir&.remove
          end

          def build_content
            infom 'Writing Git source code...'
            ::Avm::Git::Commit.new(git, commit_sha1).deploy_to_env_path(
              build_dir_env,
              build_dir
            ).variables_source_set(variables_source).run
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
eac_tools-0.37.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/build.rb
eac_tools-0.36.1 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/build.rb
avm-eac_webapp_base0-0.9.2 lib/avm/eac_webapp_base0/instances/deploy/build.rb
eac_tools-0.36.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/build.rb
avm-eac_webapp_base0-0.9.1 lib/avm/eac_webapp_base0/instances/deploy/build.rb
eac_tools-0.35.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/build.rb
eac_tools-0.34.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/build.rb
eac_tools-0.33.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/build.rb
avm-eac_webapp_base0-0.9.0 lib/avm/eac_webapp_base0/instances/deploy/build.rb
eac_tools-0.32.0 sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/build.rb