diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-18 19:23:28 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-18 19:23:28 +0000 |
| commit | 3c93400026dbb98cffe149c873feebb5ab9e5be7 (patch) | |
| tree | b6945551fbed8621c1621081ce05483def62a5db /Rakefile | |
| parent | 10dbb17ed1b2241618f13973d02e17de1dd4e44f (diff) | |
| download | puppet-3c93400026dbb98cffe149c873feebb5ab9e5be7.tar.gz puppet-3c93400026dbb98cffe149c873feebb5ab9e5be7.tar.xz puppet-3c93400026dbb98cffe149c873feebb5ab9e5be7.zip | |
Adding daily snapshot tasks, altho they only work at my site
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1948 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'Rakefile')
| -rw-r--r-- | Rakefile | 43 |
1 files changed, 43 insertions, 0 deletions
@@ -94,4 +94,47 @@ task :debian_packages => [ "debian", :check_build_deps, :fakeroot_is_runnable ] system("fakeroot debian/rules binary") || exit(1) end + +def dailyfile(package) + "#{downdir}/#{package}/#{package}-daily-#{stamp}.tgz" +end + +def daily(package) + edir = "/tmp/daily-export" + Dir.mkdir edir + Dir.chdir(edir) do + sh %{svn export http://reductivelabs.com/svn/#{package}/trunk #{package} >/dev/null} + sh %{tar cf - #{package} | gzip -c > #{dailyfile(package)}} + end + FileUtils.rm_rf(edir) +end + +def downdir + ENV['DOWNLOAD_DIR'] || "/export/docroots/reductivelabs.com/htdocs/downloads" +end + +def stamp + [Time.now.year, Time.now.month, Time.now.day].collect { |i| i.to_s}.join +end + +pdaily = dailyfile("puppet") +fdaily = dailyfile("facter") + +file pdaily do + daily("puppet") +end + +file fdaily do + daily("facter") +end + +task :daily => [pdaily, fdaily] + +task :dailyclean do + Dir.glob("#{downdir}/*/*daily*.tgz").each do |file| + puts "Removing %s" % file + File.unlink(file) + end +end + # $Id$ |
