Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 48 lines (40 sloc) 1.227 kb
35df416 Robert Evans First commit
authored
1 require 'rubygems'
2 require 'chef'
3 require 'json'
7b947b6 Robert Evans Copy of opscode cookbooks
authored
4 TOPDIR = File.expand_path(File.join(File.dirname(__FILE__), ".."))
35df416 Robert Evans First commit
authored
5
6
7 TOPDIR = File.expand_path(File.join(File.dirname(__FILE__), ".."))
8 TEST_CACHE = File.expand_path(File.join(TOPDIR, ".rake_test_cache"))
9 COMPANY_NAME = "Opscode, Inc."
10 SSL_EMAIL_ADDRESS = "cookbooks@opscode.com"
11 NEW_COOKBOOK_LICENSE = :apachev2
12
13 load 'chef/tasks/chef_repo.rake'
14 task :default => [ :test ]
15
16 desc "Build a bootstrap.tar.gz"
17 task :build_bootstrap do
18 bootstrap_files = Rake::FileList.new
19 %w(apache2 runit couchdb stompserver chef passenger ruby packages).each do |cookbook|
20 bootstrap_files.include "#{cookbook}/**/*"
21 end
22
23 tmp_dir = "tmp"
24 cookbooks_dir = File.join(tmp_dir, "cookbooks")
25 rm_rf tmp_dir
26 mkdir_p cookbooks_dir
27 bootstrap_files.each do |fn|
28 f = File.join(cookbooks_dir, fn)
29 fdir = File.dirname(f)
30 mkdir_p(fdir) if !File.exist?(fdir)
31 if File.directory?(fn)
32 mkdir_p(f)
33 else
34 rm_f f
35 safe_ln(fn, f)
36 end
37 end
38
39 chdir(tmp_dir) do
40 sh %{tar zcvf bootstrap.tar.gz cookbooks}
41 end
42 end
43
44 # remove unnecessary tasks
45 %w{update install roles ssl_cert}.each do |t|
46 Rake.application.instance_variable_get('@tasks').delete(t.to_s)
47 end
Something went wrong with that request. Please try again.