require_relative('./environment.rb') class Upgrade < Array def initialize if(Environment.scm=='git' && Environment.branch=='develop') Dir.glob('dep/**/*.dll').each {|f| src=Environment.dev_root + "/" + f 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