lib/tasks/commit.rb in dev-2.0.177 vs lib/tasks/commit.rb in dev-2.0.178
- old
+ new
@@ -1,8 +1,12 @@
puts __FILE__ if defined?(DEBUG)
desc 'commits source files to git or subversion'
-task :commit do Tasks.execute_task :commit;end
+if(File.exists?('git'))
+ task :commit=>[:add] do Tasks.execute_task :commit; end
+else
+ task :commit do Tasks.execute_task :commit;end
+end
class Commit < Array
def update
message=""
message=IO.read('commit.message').strip if File.exists?('commit.message')
\ No newline at end of file