Sha256: e4f9e0594b298792069c1acdfd736030e5ea6ab481f6f07a583ae708e2cbdb33
Contents?: true
Size: 1.05 KB
Versions: 13
Compression:
Stored size: 1.05 KB
Contents
module HerokuDeployment class Git class << self def current_version `git show HEAD | head -n 1`.split(" ").last.strip end def push system %(git push >/dev/null 2>&1) end def pull system %(git pull >/dev/null 2>&1) end def push_remote create_heroku_remote system %(git push #{HerokuDeployment::Config.remote} master) end def pull_remote system %(git pull #{HerokuDeployment::Config.remote} master >/dev/null 2>&1) end def commit system %(git commit -m "Heroku deployment" -o #{HerokuDeployment::Config.commit_files.join(" ")} >/dev/null 2>&1) end def create_heroku_remote remote = HerokuDeployment::Config.remote app = HerokuDeployment::Config.app if `git remote | grep #{remote}`.to_s == "" puts "Couldn't find '#{remote}' remote, added one now" system %(git remote add #{remote} git@heroku.com:#{app}.git) end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems