diff options
author | Brandon Mathis <brandon@imathis.com> | 2011-07-19 22:18:34 -0400 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2011-07-19 22:18:34 -0400 |
commit | 19df7e84d6e1ba3b502df3ec558e1fc6260e1d51 (patch) | |
tree | 42a505699c8cac5bdd19e1cf742b9350e740c5c4 /Rakefile | |
parent | 6a149ea30242d58b9b872a119323af0ac0dfa06d (diff) | |
download | my_new_personal_website-19df7e84d6e1ba3b502df3ec558e1fc6260e1d51.tar.xz my_new_personal_website-19df7e84d6e1ba3b502df3ec558e1fc6260e1d51.zip |
added source_update and sass_update rake tasks, for easily updating a blog to the latest theme
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -124,6 +124,27 @@ task :clean do system "rm -rf _code_cache/** _gist_cache/** .sass-cache/**" end +desc "Move sass to sass.old, install sass theme updates, replace sass/custom with sass.old/custom" +task :update_style, :theme do |t, args| + theme = args.theme || 'classic' + system "mv sass sass.old" + puts "## Moved styles into sass.old/" + system "mkdir -p sass; cp -R #{themes_dir}/"+theme+"/sass/ sass/" + cp_r "sass.old/custom/.", "sass/custom" + puts "## Updated Sass ##" +end + +desc "Move source to source.old, install source theme updates, replace source/_includes/navigation.html with source.old's navigation" +task :update_source, :theme do |t, args| + theme = args.theme || 'classic' + system "mv #{source_dir} #{source_dir}.old" + puts "moved #{source_dir} into #{source_dir}.old/" + system "mkdir -p #{source_dir}; cp -R #{themes_dir}/"+theme+"/source/. #{source_dir}" + system "cp -Rn #{source_dir}.old/. #{source_dir}" + system "cp -f #{source_dir}.old/_includes/navigation.html #{source_dir}/_includes/navigation.html" + puts "## Updated #{source_dir} ##" +end + ############## # Deploying # ############## |