Class: Docman::Builders::GitDirectBuilder
- Defined in:
- lib/docman/builders/git_direct_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
14 15 16 17 18 19 20 |
# File 'lib/docman/builders/git_direct_builder.rb', line 14 def changed? stored_version = @context.stored_version['result'] @last_revision = GitUtil.last_revision @context['full_build_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) stored_version != @version end |
#execute ⇒ Object
7 8 9 10 11 12 |
# File 'lib/docman/builders/git_direct_builder.rb', line 7 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 |