build clean should ignore dotfiles

This commit is contained in:
Thomas Reynolds 2011-10-18 22:03:13 -07:00
parent 12ca8f0caf
commit 03f17ff551
3 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2.0.13.1
====
build --clean shouldn't remove dotfiles
2.0.13 2.0.13
==== ====
middleman build --clean keeps the build directory clean of leftover files middleman build --clean keeps the build directory clean of leftover files

View file

@ -68,6 +68,7 @@ module Middleman
def queue_current_paths_from(destination) def queue_current_paths_from(destination)
@cleaning_queue = [] @cleaning_queue = []
Find.find(destination) do |path| Find.find(destination) do |path|
next if path.match(/\/\./)
unless path == destination unless path == destination
@cleaning_queue << path.sub(destination, destination[/([^\/]+?)$/]) @cleaning_queue << path.sub(destination, destination[/([^\/]+?)$/])
end end

View file

@ -1,3 +1,3 @@
module Middleman module Middleman
VERSION = "2.0.13" VERSION = "2.0.13.1"
end end