Sha256: 50e280803f2fde5c697b85b0946684c0059728fd574dfbe0f5c0f36e987036ee
Contents?: true
Size: 952 Bytes
Versions: 10
Compression:
Stored size: 952 Bytes
Contents
module Docman module Builders class GitProviderBuilder < ProviderBuilder register_builder :git_provider_builder def prepare_build_dir FileUtils.mkdir_p(@context['full_build_path']) end def build_with_provider `find #{@context['full_build_path']} -mindepth 1 -maxdepth 1 -not -name '.git' -print0 | xargs -r -0 rm -rf --` if File.directory? @context['full_build_path'] FileUtils.rm_r self['target_path'] if @context.need_rebuild? and File.directory? self['target_path'] result = @provider.perform `rsync -a --exclude '.git' #{self['target_path']}/. #{@context['full_build_path']}` result end def changed_from_last_version? @provider.changed_from_last_version? end def execute prepare_build_dir @execute_result = build_with_provider changed_from_last_version? ? @execute_result : false end end end end
Version data entries
10 entries across 10 versions & 1 rubygems