require_relative('./environment.rb') class Upgrade < Array def initialize puts "Upgrade discovery" if(Environment.scm=='git' && Environment.branch=='develop') Dir.glob('dep/**/*.dll').each {|f| src=Environment.dev_root + "/" + f puts "source: " + src puts " dest: " + f + " " + File.mtime(f).to_s if(File.exist?(src) && File.mtime(src) > File.mtime(f)) self.add "<%FileUtils.cp('#{src}','#{f}')%>" end } end end def add command self << command if(!include?(command)) end end