Sha256: 552b8ab139a6d1fc0deccb25f2d46ecbad1d473291d27e59e509e01c492ffb6d

Contents?: true

Size: 1.07 KB

Versions: 64

Compression:

Stored size: 1.07 KB

Contents

module Docman
  module Builders
    class GitStripBuilder < Builder

      register_builder :git_strip_builder

      def execute
        FileUtils.rm_r(@context['full_build_path']) if File.directory? @context['full_build_path']
        FileUtils.rm_r @context['temp_path'] if @context.need_rebuild? and File.directory? @context['temp_path']
        @version = GitUtil.get(@context['repo'], @context['temp_path'], @context.version_type, @context.version, nil, nil)
        FileUtils.mkdir_p(@context['full_build_path'])
        FileUtils.cp_r(Dir["#{@context['temp_path']}/."], @context['full_build_path'])
        FileUtils.rm_r(File.join(@context['full_build_path'], '.git')) if File.directory?(File.join(@context['full_build_path'], '.git'))
        GitUtil.repo_changed?(@context['full_build_path']) ? @version : false
      end

      def changed?
        stored_version = @context.stored_version['result']
        @version = GitUtil.get(@context['repo'], @context['temp_path'], @context.version_type, @context.version, nil, nil)
        stored_version != @version
      end

    end
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
docman-0.0.80 lib/docman/builders/git_strip_builder.rb
docman-0.0.79 lib/docman/builders/git_strip_builder.rb
docman-0.0.78 lib/docman/builders/git_strip_builder.rb
docman-0.0.77 lib/docman/builders/git_strip_builder.rb
docman-0.0.76 lib/docman/builders/git_strip_builder.rb
docman-0.0.75 lib/docman/builders/git_strip_builder.rb
docman-0.0.74 lib/docman/builders/git_strip_builder.rb
docman-0.0.73 lib/docman/builders/git_strip_builder.rb
docman-0.0.72 lib/docman/builders/git_strip_builder.rb
docman-0.0.71 lib/docman/builders/git_strip_builder.rb
docman-0.0.70 lib/docman/builders/git_strip_builder.rb
docman-0.0.69 lib/docman/builders/git_strip_builder.rb
docman-0.0.68 lib/docman/builders/git_strip_builder.rb
docman-0.0.67 lib/docman/builders/git_strip_builder.rb
docman-0.0.66 lib/docman/builders/git_strip_builder.rb
docman-0.0.65 lib/docman/builders/git_strip_builder.rb
docman-0.0.64 lib/docman/builders/git_strip_builder.rb
docman-0.0.63 lib/docman/builders/git_strip_builder.rb
docman-0.0.62 lib/docman/builders/git_strip_builder.rb
docman-0.0.61 lib/docman/builders/git_strip_builder.rb