Sha256: 3d8ab0c98ec0f538423c805e134346178516779b3ae027ff955551006f4a90be

Contents?: true

Size: 901 Bytes

Versions: 2

Compression:

Stored size: 901 Bytes

Contents

# $Id: manifest.rake 85 2008-01-01 20:37:31Z 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

2 entries across 2 versions & 1 rubygems

Version Path
webby-0.7.0 tasks/manifest.rake
webby-0.7.1 tasks/manifest.rake