module RakeRoll::GitCommands

Public Instance Methods

get_current_branch() click to toggle source
# File lib/rake_roll/git_commands.rb, line 5
def get_current_branch
  #run as a direct command to retrieve the output
  `git rev-parse --abbrev-ref HEAD`.chomp
end
git_add(file) click to toggle source
# File lib/rake_roll/git_commands.rb, line 25
def git_add(file)
  puts "Adding #{file}"
  system("git add #{file}")
end
git_commit(message) click to toggle source
# File lib/rake_roll/git_commands.rb, line 35
def git_commit(message)
  puts "Commiting: #{message}"
  system("git commit CHANGELOG VERSION -m '#{message}'")
end
git_log(log_type) click to toggle source
# File lib/rake_roll/git_commands.rb, line 20
def git_log(log_type)
  #run as a direct command to retrieve the output
  `git log #{log_type}`
end
git_push_branch(branch) click to toggle source
# File lib/rake_roll/git_commands.rb, line 10
def git_push_branch(branch)
  puts "Pushing to origin #{branch}"
  system("git push origin #{branch}")
end
git_push_tags() click to toggle source
# File lib/rake_roll/git_commands.rb, line 15
def git_push_tags
  puts "Pushing tags"
  system("git push --tags")
end
git_tag(tag) click to toggle source
# File lib/rake_roll/git_commands.rb, line 30
def git_tag(tag)
  puts "Creating tag #{new_version}"
  system("git tag #{tag}")
end