Top Level Namespace
- Includes:
- FileTest, FileUtils
Defined Under Namespace
Modules: FubuRake, Nuget, Platform
Classes: FubuDocs, MSBuildRunner
Constant Summary
collapse
- BUILD_VERSION =
"0.0.1"
Instance Method Summary
collapse
Instance Method Details
#cleanDirectory(dir) ⇒ Object
469
470
471
472
473
474
475
476
477
478
479
|
# File 'lib/fuburake.rb', line 469
def cleanDirectory(dir)
if exists?(dir)
puts 'Cleaning directory ' + dir
FileUtils.rm_rf dir;
waitfor { !exists?(dir) }
end
if dir == 'artifacts'
Dir.mkdir 'artifacts'
end
end
|
#cleanFile(file) ⇒ Object
481
482
483
|
# File 'lib/fuburake.rb', line 481
def cleanFile(file)
File.delete file unless !File.exist?(file)
end
|
#copyOutputFiles(fromDir, filePattern, outDir) ⇒ Object
454
455
456
457
458
|
# File 'lib/fuburake.rb', line 454
def copyOutputFiles(fromDir, filePattern, outDir)
Dir.glob(File.join(fromDir, filePattern)){|file|
copy(file, outDir) if File.file?(file)
}
end
|
#waitfor(&block) ⇒ Object
460
461
462
463
464
465
466
467
|
# File 'lib/fuburake.rb', line 460
def waitfor(&block)
checks = 0
until block.call || checks >10
sleep 0.5
checks += 1
end
raise 'waitfor timeout expired' if checks > 10
end
|