Sha256: 9d1c62ee719533f2c5fa5526a912a82c74d63f27256eb7b24fc458d21868bd96
Contents?: true
Size: 902 Bytes
Versions: 6
Compression:
Stored size: 902 Bytes
Contents
# $Id: manifest.rake 419 2007-12-29 04:39:36Z tim_pease $ require 'find' namespace :manifest do desc 'Verify the manifest' task :check do fn = 'Manifest.tmp' files = [] exclude = Regexp.new(PROJ.exclude.join('|')) Find.find '.' do |path| path.sub! %r/^(\.\/|\/)/o, '' next unless test ?f, path next if path =~ exclude files << path end File.open(fn, 'w') {|fp| fp.puts files.sort} system "#{DIFF} -du Manifest.txt #{fn}" rm fn rescue nil end desc 'Create a new manifest' task :create do fn = 'Manifest.txt' files = [] exclude = Regexp.new(PROJ.exclude.join('|')) Find.find '.' do |path| path.sub! %r/^(\.\/|\/)/o, '' next unless test ?f, path next if path =~ exclude files << path end files << fn unless test ?f, fn File.open(fn, 'w') {|fp| fp.puts files.sort} end end # EOF
Version data entries
6 entries across 6 versions & 1 rubygems