Copydot rake task now includes .nojekyll and .htaccess files. Since some OSes or applications create unimportant hidden files, this only copies hidden files known to be useful for blogging. This closes #303 #348 #419

This commit is contained in:
Brandon Mathis 2012-05-22 17:13:55 -05:00
parent ba8edf37a7
commit 09a2e3754d

View File

@ -260,8 +260,11 @@ end
desc "copy dot files for deployment"
task :copydot, :source, :dest do |t, args|
FileList["#{args.source}/**/.*"].exclude("**/.", "**/..", "**/.DS_Store", "**/._*").each do |file|
cp_r file, file.gsub(/#{args.source}/, "#{args.dest}") unless File.directory?(file)
files = [".htaccess", ".nojekyll"]
Dir["#{args.source}/.*"].each do |file|
if !File.directory?(file) && files.include?(File.basename(file))
cp(file, file.gsub(/#{args.source}/, "#{args.dest}"));
end
end
end