]> git.cworth.org Git - sup/blob - Rakefile
Merge commit 'origin/undo-manager'
[sup] / Rakefile
1 ## is there really no way to make a rule for this?
2 WWW_FILES = %w(www/index.html README.txt doc/Philosophy.txt doc/FAQ.txt doc/NewUserGuide.txt www/main.css)
3
4 rule 'ss?.png' => 'ss?-small.png' do |t|
5 end
6 SCREENSHOTS = FileList["www/ss?.png"]
7 SCREENSHOTS_SMALL = []
8 SCREENSHOTS.each do |fn|
9   fn =~ /ss(\d+)\.png/
10   sfn = "www/ss#{$1}-small.png"
11   file sfn => [fn] do |t|
12     sh "cat #{fn} | pngtopnm | pnmscale -xysize 320 240 | pnmtopng > #{sfn}"
13   end
14   SCREENSHOTS_SMALL << sfn
15 end
16
17 task :upload_webpage => WWW_FILES do |t|
18   sh "rsync -essh -cavz #{t.prerequisites * ' '} wmorgan@rubyforge.org:/var/www/gforge-projects/sup/"
19 end
20
21 task :upload_webpage_images => (SCREENSHOTS + SCREENSHOTS_SMALL) do |t|
22   sh "rsync -essh -cavz #{t.prerequisites * ' '} wmorgan@rubyforge.org:/var/www/gforge-projects/sup/"
23 end
24
25 # vim: syntax=ruby
26 # -*- ruby -*-
27 task :upload_report do |t|
28   sh "ditz html ditz"
29   sh "rsync -essh -cavz ditz wmorgan@rubyforge.org:/var/www/gforge-projects/sup/"
30 end
31
32 task :gem do |t|
33   sh "gem1.8 build sup.gemspec"
34 end
35
36 task :tarball do |t|
37   require "sup-files"
38   require "sup-version"
39   sh "tar cfvz sup-#{SUP_VERSION}.tgz #{SUP_FILES.join(' ')}"
40 end