Sha256: ff41281a12f467349dc2c9a99a0a5d29f3d9d76abe6b922b5f96de97ad4cf338
Contents?: true
Size: 1.15 KB
Versions: 12
Compression:
Stored size: 1.15 KB
Contents
require_relative('./environment.rb') class Upgrade < Array def initialize update end def update 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 } if(defined?(DEV_TASKS)) if(DEV_TASKS[:dependencies].has_key?(:rake)) DEV_TASKS[:dependencies][:rake].each{|rake_dir| self.add "<%Environment.rake('#{rake_dir}')%>" if(Dir.exists?(rake_dir)) } end if(DEV_TASKS[:dependencies].has_key?(:source)) DEV_TASKS[:dependencies][:source].each{|source_dep| dest = "./dep/#{File.basename(source_dep)}" if(!File.exists?(dest)) self.add "<%FileUtils.cp('#{source_dep}','#{dest}')%>" else if(File.exists?(source_dep)) self.add "<%FileUtils.cp('#{source_dep}','#{dest}')%>" if(File.mtime(source_dep) > File.mtime(dest)) end end } end end end end def add command self << command if(!include?(command)) end end
Version data entries
12 entries across 12 versions & 1 rubygems