lib/docman/builders/git_direct_builder.rb in docman-0.0.69 vs lib/docman/builders/git_direct_builder.rb in docman-0.0.70

- old
+ new

@@ -11,12 +11,18 @@ @last_revision != @version ? @version : false end def changed? stored_version = @context.stored_version['result'] - @last_revision = GitUtil.last_revision @context['full_build_path'] + 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'], @context['full_build_path'], @context.version_type, @context.version) + @version = @context['type'] == 'root' ? @context['build_path'] : GitUtil.get(@context['repo'], repo_path, @context.version_type, @context.version) stored_version != @version end end end