Class: DeployNotes::Cap
- Inherits:
-
Object
- Object
- DeployNotes::Cap
- Defined in:
- lib/deploy_notes/cap.rb
Overview
Class for capistrano deployments
Instance Method Summary collapse
Instance Method Details
#branch_name ⇒ Object
8 9 10 |
# File 'lib/deploy_notes/cap.rb', line 8 def branch_name `tail -1 #{current}/../../revisions.log | cut -d' ' -f2` end |
#commit_info ⇒ Object
17 18 19 |
# File 'lib/deploy_notes/cap.rb', line 17 def commit_info `git --git-dir=#{repo} --work-tree #{current} log #{revision} -n1 --pretty=format:[%ae:%s][%cr][%h]` end |
#deploy_time ⇒ Object
12 13 14 15 |
# File 'lib/deploy_notes/cap.rb', line 12 def deploy_time deploy_time = `stat -c '%y' #{current}/REVISION` deploy_time.to_time.to_s(:db) end |
#get ⇒ Object
4 5 6 |
# File 'lib/deploy_notes/cap.rb', line 4 def get "[#{branch_name}] - [#{deploy_time}] - [#{commit_info}]" end |