lib/upgrade.rb in dev_tasks-0.0.44 vs lib/upgrade.rb in dev_tasks-0.0.45
- old
+ new
@@ -1,16 +1,28 @@
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].hash_key?(:source))
+ DEV_TASKS[:dependencies][:source].each{|source_dep|
+ dest = "./dep/#{File.basename(source_dep)}"
+ self.add "<%Environment.copy_if_newer('#{source}','#{dest}')%>"
+ }
+ end
+ end
end
end
def add command
self << command if(!include?(command))
\ No newline at end of file