Sha256: 1ce4ed5a20f8cc9f0950e70adee96477f18ee14b041c3ec44438fd156c4daa4b
Contents?: true
Size: 992 Bytes
Versions: 1
Compression:
Stored size: 992 Bytes
Contents
# $Id: manifest.rake 489 2008-02-01 17:32:57Z 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 # namespace :manifest desc 'Alias to manifest:check' task :manifest => 'manifest:check' # EOF
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bones-1.3.1 | tasks/manifest.rake |