/Rakefile
http://github.com/dysinger/chef-box · Rakefile · 22 lines · 19 code · 2 blank · 1 comment · 0 complexity · 27629e23f2d6f6a2e63b5d0ed2c91af2 MD5 · raw file
- #-*- mode: ruby; -*-
- namespace :box do
- [ :lucid, :maverick, :natty ].each do |release|
- [ 32, 64 ].each do |architecture|
- flavor = "#{release}#{architecture}"
- ( @flavors ||= [] ) << flavor
- desc "Build #{flavor}"
- task flavor do
- begin sh "rm -f #{flavor}.box" ; rescue ; end
- [ :build, :export, :destroy ].each do |command|
- sh "bundle exec vagrant basebox #{command} #{flavor}"
- end
- begin sh "bundle exec vagrant box remove #{flavor}" ; rescue ; end
- sh "bundle exec vagrant box add #{flavor} #{flavor}.box"
- end
- end
- end
- desc "Build all"
- task :all => @flavors
- end