Class: Bumpversion::Hook
- Inherits:
-
Object
- Object
- Bumpversion::Hook
- Defined in:
- lib/bumpversion/hook.rb
Class Method Summary collapse
- .call_system(key_hook, options) ⇒ Object
- .pos_commit_hook(options) ⇒ Object
- .pre_commit_hook(options) ⇒ Object
Class Method Details
.call_system(key_hook, options) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/bumpversion/hook.rb', line 4 def self.call_system(key_hook, ) return false unless [key_hook] command = [key_hook] % PrettyOutput.info "Executing command: #{command}" system("#{command} 1> /dev/null") if command end |
.pos_commit_hook(options) ⇒ Object
11 12 13 |
# File 'lib/bumpversion/hook.rb', line 11 def self.pos_commit_hook() call_system(:pos_commit_hooks, ) end |
.pre_commit_hook(options) ⇒ Object
15 16 17 |
# File 'lib/bumpversion/hook.rb', line 15 def self.pre_commit_hook() call_system(:pre_commit_hooks, ) end |