diff options
author | Brandon Mathis <brandon@imathis.com> | 2011-08-21 18:38:10 -0400 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2011-08-21 18:38:18 -0400 |
commit | 9f830dd96f75454be21c9d5bfa96608d192e5f24 (patch) | |
tree | 9dc7adb85bf1eb3a56aac29efdbd83fb335dea56 | |
parent | b40d2fb2a4491a9e269cb7c5c59e848787c2b499 (diff) | |
download | my_new_personal_website-9f830dd96f75454be21c9d5bfa96608d192e5f24.tar.xz my_new_personal_website-9f830dd96f75454be21c9d5bfa96608d192e5f24.zip |
added support for deploying "dot" files (eg. .htaccess), fixes #104
Diffstat (limited to '')
-rw-r--r-- | Rakefile | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -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}" |