Class: Semmy::Tasks::Commit

Inherits:
Base
  • Object
show all
Defined in:
lib/semmy/tasks/commit.rb

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Semmy::Tasks::Base

Instance Method Details

#defineObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/semmy/tasks/commit.rb', line 6

def define
  namespace 'commit' do
    task 'prepare' do
      Shell.info('Creating prepare commit.')

      git.commit_all(config.prepare_commit_message % {
                       version: Project.version
                     })
    end

    task 'bump' do
      Shell.info('Creating bump commit.')

      git.commit_all(config.bump_commit_message % {
                       version: Project.version
                     })
    end
  end

  def git
    Git.open('.')
  end
end

#gitObject



25
26
27
# File 'lib/semmy/tasks/commit.rb', line 25

def git
  Git.open('.')
end