Sha256: da003760738b6da57778b0ad60abed574cdb49971cc41a2516d3019b10f4a289
Contents?: true
Size: 846 Bytes
Versions: 2
Compression:
Stored size: 846 Bytes
Contents
require_relative('./environment.rb') class Commit < Array def update if(Dir.exists?(".git")) if(!`git status`.include?('nothing to commit') || `git status`.include?('untracked files present')) 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 def add command self << command if(!include?(command)) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dev_tasks-0.0.155 | lib/commit.rb |
dev_tasks-0.0.154 | lib/commit.rb |