From: Joao Tavora Date: Fri, 4 Nov 2011 13:30:46 +0000 (+0000) Subject: Added mediocre doc:upload task for updating the gh-pages branch X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/1f47718b337876e2271dafeab680c579b1d1c5c0 Added mediocre doc:upload task for updating the gh-pages branch --- diff --git a/Rakefile b/Rakefile index b908c3b6e..074dd9eda 100644 --- a/Rakefile +++ b/Rakefile @@ -67,6 +67,24 @@ namespace :doc do sh "tar cjf pkg/yasnippet-doc-#{$version}.tar.bz2 " + "--exclude=doc/.svn --exclude=doc/images/.svn doc/*.html doc/images" end + + task :upload do + if File.exists? 'doc/gh-pages' + Dir.chdir 'doc/gh-pages' do + sh "git checkout gh-pages" + end + Dir.glob("doc/*.{html,css}").each do |file| + FileUtils.cp file, 'doc/gh-pages' + end + Dir.glob("doc/images/*").each do |file| + FileUtils.cp file, 'doc/gh-pages/images' + end + Dir.chdir 'doc/gh-pages' do + sh "git commit -a -m 'Automatic documentation update.'" + sh "git push" + end + end + end end desc "Compile yasnippet.el into yasnippet.elc"