Class: MultiRepo::PostCommitHook

Inherits:
Object
  • Object
show all
Defined in:
lib/multirepo/hooks/post-commit-hook.rb

Class Method Summary collapse

Class Method Details

.runObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/multirepo/hooks/post-commit-hook.rb', line 8

def self.run
  Config.instance.running_git_hook = true
  
  Console.log_step("Performing post-commit operations...")
  
  # Works around bug #91565510 (https://www.pivotaltracker.com/story/show/91565510)
  TrackingFiles.new(".").stage
  Console.log_info("Cleaned-up staging area")
  
  exit 0
rescue StandardError => e
  Console.log_error("Post-commit hook failed to execute! #{e.message}")
  exit 1
end