Class: Bummr::Remover

Inherits:
Thor
  • Object
show all
Includes:
Log, Scm, Singleton
Defined in:
lib/bummr/remover.rb

Instance Method Summary collapse

Methods included from Log

#log

Instance Method Details

#remove_commit(sha) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/bummr/remover.rb', line 8

def remove_commit(sha)
  log "Bad commit: #{git.message(sha)}, #{sha}".color(:red)
  log "Resetting..."
  system("git bisect reset")

  message = "\nThe commit:\n\n `#{sha} #{git.message(sha)}`\n\n" +
    "Is breaking the build.\n\n" +
    "Please do one of the following: \n\n" +
    " 1. Update your code to work with the latest version of this gem.\n\n" +
    " 2. Perform the following steps to lock the gem version:\n\n" +
    "    - `git reset --hard master`\n" +
    "    - Lock the version of this Gem in your Gemfile.\n" +
    "    - Commit the changes.\n" +
    "    - Run `bummr update` again.\n\n" +
    "Lord Bummr\n\n"

  puts message.color(:yellow)
end