Sha256: c8bdef4dbf0819678ae6bcdad0845841642bd9d3b1f74cec019a182fb2d5e1e3

Contents?: true

Size: 1.03 KB

Versions: 11

Compression:

Stored size: 1.03 KB

Contents

module Docman
  module Builders
    class GitDirectBuilder < Builder

      register_builder :git_direct_builder

      def execute
        execute_result = GitUtil.get(@context['repo'], @context['full_build_path'], @context.version_type, @context.version)
        # No commit hash for 'root' as it will be changed later
        @version = @context['type'] == 'root' ? @context['build_path'] : execute_result
        @last_revision != @version ? @version : false
      end

      def changed?
        stored_version = @context.stored_version['result']
        if @context['type'] == 'root_chain'
          repo_path = @context['temp_path']
        else
          repo_path = @context['full_build_path']
        end

        @last_revision = GitUtil.last_revision(repo_path)
        # No commit hash for 'root' as it will be changed later
        @version = @context['type'] == 'root' ? @context['build_path'] : GitUtil.get(@context['repo'], repo_path, @context.version_type, @context.version)
        stored_version != @version
      end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
docman-0.0.80 lib/docman/builders/git_direct_builder.rb
docman-0.0.79 lib/docman/builders/git_direct_builder.rb
docman-0.0.78 lib/docman/builders/git_direct_builder.rb
docman-0.0.77 lib/docman/builders/git_direct_builder.rb
docman-0.0.76 lib/docman/builders/git_direct_builder.rb
docman-0.0.75 lib/docman/builders/git_direct_builder.rb
docman-0.0.74 lib/docman/builders/git_direct_builder.rb
docman-0.0.73 lib/docman/builders/git_direct_builder.rb
docman-0.0.72 lib/docman/builders/git_direct_builder.rb
docman-0.0.71 lib/docman/builders/git_direct_builder.rb
docman-0.0.70 lib/docman/builders/git_direct_builder.rb