Sha256: 51cd05270930ef8d3f73fd0db7f4525c3475d51c2d8079d9689b4a5e123e19ba
Contents?: true
Size: 859 Bytes
Versions: 38
Compression:
Stored size: 859 Bytes
Contents
require_relative './commandarray.rb' class Add < CommandArray # updates the commands in the Add CommandArray # # if a .git directory exists, the command 'git add -A -v' will be appended the Add Commands # if a .svn directory exists, all DEV[:files][:source] files that are not tracked by subversion # will have the appropriate svn add command appended to the Add Commands def update if(Dir.exists?(".git")) DEV_TASKS[:files][:source].each{|f| if(`git status #{f}`.include?('untracked')) add "git add #{f} -v" end } #if(`git status`.include?('untracked files present')) # self.add 'git add -A -v' #end end if(Dir.exists?(".svn") && defined?(DEV_TASKS)) DEV_TASKS[:files][:source].each{|f| if(`svn status #{f}`.include?('?')) add "svn add #{f}" end } end end end
Version data entries
38 entries across 38 versions & 1 rubygems