desc 'Generate website files' task :website_generate do sh %{ ruby scripts/txt2html website/index.txt > website/index.html } sh %{ ruby scripts/txt2js website/version.txt > website/version.js } sh %{ ruby scripts/txt2js website/version-raw.txt > website/version-raw.js } end desc 'Upload website files to rubyforge' task :website_upload do config = YAML.load(File.read(File.expand_path("~/.rubyforge/user-config.yml"))) host = "#{config["username"]}@rubyforge.org" remote_dir = "/var/www/gforge-projects/#{RUBYFORGE_PROJECT}/" local_dir = 'website' sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}} end desc 'Generate and upload website files' task :website => [:website_generate, :website_upload, :publish_docs]