Sha256: 61a7e2bcc11418752f7890078806b9ebb12b5b01fbc6ac1466f0b3d64f98bfbb

Contents?: true

Size: 938 Bytes

Versions: 26

Compression:

Stored size: 938 Bytes

Contents

require 'pathname'

module Docman
  module Builders
    class CopyBuilder < Builder

      register_builder :copy_builder

      def prepare_build_dir
        if not @context['root_repo'].nil?
          GitUtil.get(@context['root_repo'], @context['full_build_path'], @context.version_type(type: 'root'), @context.version(type: 'root'), true, 1)
        end
      end

      def execute
        prepare_build_dir
        docroot_config_dir = Pathname(@context['docroot_config'].docroot_config_dir)
        config_dir = Pathname(@context['docroot_config'].config_dir)
        log("Copy project files from: #{docroot_config_dir}")
        `rsync -a --exclude '.git' --exclude 'config.json' --exclude '#{config_dir.relative_path_from(docroot_config_dir)}' #{File.join(@context['docroot_config'].docroot_dir, 'config')}/. #{@context['full_build_path']}`
      end

      def version
        @context['build_path']
      end

    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
docman-0.0.107 lib/docman/builders/copy_builder.rb
docman-0.0.106 lib/docman/builders/copy_builder.rb
docman-0.0.105 lib/docman/builders/copy_builder.rb
docman-0.0.104 lib/docman/builders/copy_builder.rb
docman-0.0.103 lib/docman/builders/copy_builder.rb
docman-0.0.102 lib/docman/builders/copy_builder.rb
docman-0.0.101 lib/docman/builders/copy_builder.rb
docman-0.0.100 lib/docman/builders/copy_builder.rb
docman-0.0.99 lib/docman/builders/copy_builder.rb
docman-0.0.98 lib/docman/builders/copy_builder.rb
docman-0.0.97 lib/docman/builders/copy_builder.rb
docman-0.0.96 lib/docman/builders/copy_builder.rb
docman-0.0.95 lib/docman/builders/copy_builder.rb
docman-0.0.94 lib/docman/builders/copy_builder.rb
docman-0.0.93 lib/docman/builders/copy_builder.rb
docman-0.0.92 lib/docman/builders/copy_builder.rb
docman-0.0.91 lib/docman/builders/copy_builder.rb
docman-0.0.90 lib/docman/builders/copy_builder.rb
docman-0.0.89 lib/docman/builders/copy_builder.rb
docman-0.0.88 lib/docman/builders/copy_builder.rb