Sha256: 8bea4d0db849595c3e3c401536b46dc9497b70a5182fd37c7e700008f524e0aa
Contents?: true
Size: 1.3 KB
Versions: 47
Compression:
Stored size: 1.3 KB
Contents
puts __FILE__ if defined?(DEBUG) desc 'adds source files to git or subversion' task :add do Tasks.execute_task :add;end class Add < Array def update if(File.exists?('.git') && File.exists?('.gitignore')) add 'git add --all' else if(defined?(SOURCE)) if(File.exists?('.svn')) SOURCE.each{|f| if(File.exists?(f) && File.file?(f)) status=Command.output("svn status #{f}") error=Command.error("svn status #{f}") if(status.include?('?') || status.include?('was not found') || error.include?('was not found')) puts "svn add #{f} --parents" add "svn add #{f} --parents" else #puts "#{status}" if status.strip.length > 0 #puts " #{f}" if status.strip.length == 0 end end } end if(File.exists?('.git')) SOURCE.each{|f| if(File.exists?(f) && File.file?(f)) status=`git status #{f} --short` #if status.include?('untracked') || status.include?('modified:') if status.include?('??') || status.include?(' M ') puts "git add #{f} -v" add "git add #{f} -v" else #puts status if status.strip.length > 0 end end } end end end end end
Version data entries
47 entries across 47 versions & 1 rubygems