Class: Docman::Builders::GitRootChainBuilder
- Defined in:
- lib/docman/builders/git_root_chain_builder.rb
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
Methods inherited from Builder
#config, create, #describe, #prefix, register_builder, #validate_command, #version
Methods inherited from Command
#add_action, #add_actions, #config, create, #describe, #initialize, #perform, #prefix, register_command, #replace_placeholder, #run_actions, #run_with_hooks
Methods included from Logging
#log, logger, #logger, #prefix, #properties_info, #with_logging
Constructor Details
This class inherits a constructor from Docman::Command
Instance Method Details
#changed? ⇒ Boolean
13 14 15 16 17 18 19 |
# File 'lib/docman/builders/git_root_chain_builder.rb', line 13 def changed? stored_version = @context.stored_version['result'] @last_revision = GitUtil.last_revision @context['temp_path'] # No commit hash for 'root' as it will be changed later @version = GitUtil.get(@context['repo'], @context['temp_path'], @context.version_type, @context.version) stored_version != @version end |
#execute ⇒ Object
7 8 9 10 11 |
# File 'lib/docman/builders/git_root_chain_builder.rb', line 7 def execute GitUtil.get(@context['root_repo'], @context['full_build_path'], @context.version_type(type: 'root'), @context.version(type: 'root')) @version = Docman::Command.create({'type' => :git_copy_repo_content, 'remove_target' => true}, @context, self).perform @last_revision != @version ? @version : false end |