Sha256: 9d69c0654db539139dd47cd382ab45330fa7389a6a6acba4645d88458e7006fe
Contents?: true
Size: 1.54 KB
Versions: 2
Compression:
Stored size: 1.54 KB
Contents
gen Action do puts "running action" if var[:act_verbose] end task :do_nothing file "auto.rf" do |t| open(t.name, "w") { |f| f << <<-EOF task "auto.t" do |t| sys.touch t.name end EOF } end file "version.t" do |t| open(t.name, "w") { |f| f.puts "1.0" } end gen Action do rac.build "version.t" end auto_t_task = source "auto.rf" rac.abort unless auto_t_task.name == "auto.t" task :clean do sys.rm_f %w(auto.t auto.rf version.t) sys.rm_rf %w(basedir.t) end gen Directory, "tmp.t" task "tmp.t/Rantfile" => "tmp.t" do |t| open(t.name, "w") { |f| f << <<-EOF file "test.t" do |t| sys.touch t.name end EOF } end task :subdir_tmp do subdirs %w(tmp.t) end task :build_test_t do |t| rac.build "tmp.t/test.t" # just ensure we're NOT in the tmp.t directory #STDERR.puts Dir.pwd test(?d, "tmp.t") or t.fail end desc "Make some path (basedir.t/a/b)." gen Directory, "basedir.t", "a/b" gen Action do if var[:make_path] make Directory, "basedir.t" make "basedir.t/a/b" end end task :make_file do |t| make "make_file.t" do |t| sys.touch t.name end end file "make_files_dep.t" do |t| sys.touch t.name end gen Action do if var[:make_files] make "make_files.t" => "make_files_dep.t" do |t| sys.touch t.name end end if var[:make_gen_with_block] import "subfile" make SubFile, "a.t/a.t" do |t| sys.touch t.name end end end task :dep_on_make_files => ["make_files.t"] # vim: ft=ruby
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rant-0.4.4 | test/Rantfile |
rant-0.4.2 | test/Rantfile |