Sha256: 5157a48ff461cd4ebd3e7a9d8ae37d20eddee50819880dd0e73fea08de46ce20
Contents?: true
Size: 793 Bytes
Versions: 8
Compression:
Stored size: 793 Bytes
Contents
module Docman class GitCommitCmd < Docman::Command register_command :git_commit def validate_command raise "Please provide 'context'" if @context.nil? raise "Context should be of type 'Info'" unless @context.is_a? Docman::Info end before_execute do unless GitUtil.repo_changed? @context['root']['full_build_path'] raise NoChangesError, "Repo not changed needed, commit not needed" end # @not_execute = true unless GitUtil.repo_changed? @context['root']['full_build_path'] end def execute message = "name: #{@context['name']} updated, state: #{@context['state']}" with_logging(message) do GitUtil.commit(@context['root']['full_build_path'], @context['full_build_path'], message) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems