Class: Commit
- Inherits:
-
Object
- Object
- Commit
- Defined in:
- lib/commit.rb
Overview
< CommandArray
Instance Method Summary collapse
Instance Method Details
#update ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/commit.rb', line 5 def update if(Dir.exists?(".git") && `git config --list`.include?('user.name=')) if(`git status`.include?('nothing to commit') || `git status`.include?('untracked files present')) # skip else if(File.exists?('commit.message') && File.read('commit.message').gsub(/\s+/, "").length > 0) self.add "git commit -a -v -m \"#{File.read('commit.message')}\"" self.add "<%File.open('commit.message','w'){|f|f.write('')}%>" else self.add 'git commit -a -v -m "commit all"' end end end if(Dir.exists?(".svn")) self.add 'svn commit -m"commit all"' self.add "svn update" self.add '<%puts "Last Changed Rev: " + Environment.svn_latest_revision%>' self.add "<%DEV_TASKS[:commands][:verify].update%>" end end |