lib/docman/builders/git_direct_builder.rb in docman-0.0.17 vs lib/docman/builders/git_direct_builder.rb in docman-0.0.18

- old
+ new

@@ -3,13 +3,15 @@ class GitDirectBuilder < Builder register_builder :git_direct_builder def execute + old_revision = GitUtil.last_revision @context['full_build_path'] 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 + last_revision = GitUtil.last_revision @context['full_build_path'] @version = @context['type'] == 'root' ? @context['build_path'] : execute_result - GitUtil.repo_changed?(@context['full_build_path']) ? @version : false + old_revision != last_revision ? @version : false end def changed? stored_version = @context.stored_version['result'] # No commit hash for 'root' as it will be changed later