Method: Docman::Builders::GitDirectBuilder#changed?

Defined in:
lib/docman/builders/git_direct_builder.rb

#changed?Boolean

Returns:

  • (Boolean)


14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/docman/builders/git_direct_builder.rb', line 14

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