Sha256: e4a59d8adc41f0d40c9cb2861cc5cf29baec9f2e9c53cacda2f5c32a1cc5e316
Contents?: true
Size: 1.84 KB
Versions: 86
Compression:
Stored size: 1.84 KB
Contents
require 'rake' require_relative('info.rb') require_relative('../base/array.rb') require_relative('../base/dir.rb') require_relative('../base/environment.rb') require_relative('../base/projects.rb') require_relative('../base/project.rb') require_relative('../base/timer.rb') puts "defining DEFAULT TASK" if Environment.default.debug? work_up_to_date=false if(defined?(DEV)) puts "DEFAULT: DEV is defined" if DEV.env.debug? project=DEV.projects.current puts "project is nil" if DEV.env.debug? && project.nil? if(!project.nil?) if(project.work_up_to_date?) puts "project work is up to date" if DEV.env.debug? work_up_to_date=true else puts "project work is NOT up to date" if DEV.env.debug? end end end if(defined?(NO_DEFAULT_TASK)) puts "NO_DEFAULT_TASK is defined" if Environment.default.debug? else default_tasks=nil default_tasks=DEFAULT_TASKS if defined? DEFAULT_TASKS if(default_tasks.nil?) if(work_up_to_date) default_tasks=[] elsif(File.exists?('.git')) default_tasks=[:setup,:build,:test,:add,:commit,:publish,:clean,:push,:pull] elsif File.exists?('.svn') default_tasks=[:setup,:build,:test,:add,:commit,:publish,:clean,:update] else default_tasks=[:setup,:build,:test,:publish] end end puts "default_tasks=#{default_tasks}" if Environment.default.debug? desc "default task #{default_tasks.to_s}" task :default do default_tasks.each{|task| Rake::Task[task].invoke } project.mark_work_up_to_date if !project.nil? puts "[:default] completed in #{TIMER.elapsed_str}" if !Environment.default.colorize? if Environment.default.colorize? require 'ansi/code' puts ANSI.white + ANSI.bold + ":default" + " completed in " + ANSI.yellow + "#{TIMER.elapsed_str}" + ANSI.reset end end end
Version data entries
86 entries across 86 versions & 1 rubygems