From 9f830dd96f75454be21c9d5bfa96608d192e5f24 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sun, 21 Aug 2011 18:38:10 -0400 Subject: added support for deploying "dot" files (eg. .htaccess), fixes #104 --- Rakefile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index aa3cbf8a..6838b186 100644 --- a/Rakefile +++ b/Rakefile @@ -163,7 +163,19 @@ end ############## desc "Default deploy task" -task :deploy => "#{deploy_default}" do +multitask :deploy => [:copydot, "#{deploy_default}"] do +end + +desc "copy dot files for deployment" +task :copydot do + cd "#{source_dir}" do + exclusions = [".", "..", ".DS_Store"] + Dir[".*"].each do |file| + if !File.directory?(file) && !exclusions.include?(file) + cp(file, "../#{public_dir}"); + end + end + end end desc "Deploy website via rsync" @@ -173,7 +185,7 @@ task :rsync do end desc "deploy public directory to github pages" -task :push do +multitask :push do puts "## Deploying branch to Github Pages " (Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) } system "cp -R #{public_dir}/* #{deploy_dir}" -- cgit v1.2.1