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.60 lib/docman/builders/git_strip_builder.rb
docman-0.0.59 lib/docman/builders/git_strip_builder.rb
docman-0.0.58 lib/docman/builders/git_strip_builder.rb
docman-0.0.57 lib/docman/builders/git_strip_builder.rb
docman-0.0.56 lib/docman/builders/git_strip_builder.rb
docman-0.0.55 lib/docman/builders/git_strip_builder.rb
docman-0.0.54 lib/docman/builders/git_strip_builder.rb
docman-0.0.53 lib/docman/builders/git_strip_builder.rb
docman-0.0.52 lib/docman/builders/git_strip_builder.rb
docman-0.0.51 lib/docman/builders/git_strip_builder.rb
docman-0.0.50 lib/docman/builders/git_strip_builder.rb
docman-0.0.49 lib/docman/builders/git_strip_builder.rb
docman-0.0.48 lib/docman/builders/git_strip_builder.rb
docman-0.0.47 lib/docman/builders/git_strip_builder.rb
docman-0.0.46 lib/docman/builders/git_strip_builder.rb
docman-0.0.45 lib/docman/builders/git_strip_builder.rb
docman-0.0.44 lib/docman/builders/git_strip_builder.rb
docman-0.0.43 lib/docman/builders/git_strip_builder.rb
docman-0.0.42 lib/docman/builders/git_strip_builder.rb
docman-0.0.41 lib/docman/builders/git_strip_builder.rb