Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 39 lines (32 sloc) 0.982 kB
b6c8910 @mdkent Have to use the bootstrap build afterall, github downloads come with
authored
1 require 'rake/packagetask'
2 require 'find'
3
81bcc7a @mdkent Big update:
authored
4 PACKAGE_NAME = "chef-el-rvm-bootstrap"
ec5bdf9 @mdkent Update for Chef 0.10.8
authored
5 PACKAGE_VERSION="0.10.8-1"
b6c8910 @mdkent Have to use the bootstrap build afterall, github downloads come with
authored
6 PACKAGE_FULL="#{PACKAGE_NAME}-#{PACKAGE_VERSION}"
7 PACKAGE_DIR = "tmp"
8 INCLUDE_FILES = "**/*"
9 EXCLUDE_FILES = "tmp"
10
97397b1 @mdkent Make it repeatable.
authored
11 def load_package_task
12 Rake::PackageTask.new(PACKAGE_NAME, PACKAGE_VERSION) do |p|
13 p.package_dir = PACKAGE_DIR
14 p.need_tar_gz = true
15 p.package_files.include(*INCLUDE_FILES)
16 p.package_files.exclude(*EXCLUDE_FILES)
17 end
b6c8910 @mdkent Have to use the bootstrap build afterall, github downloads come with
authored
18 end
19
20 desc "Build a bootstrap tar.gz"
21 task :build_bootstrap do
22 rm_rf PACKAGE_DIR
97397b1 @mdkent Make it repeatable.
authored
23
24 # Delay until after cleanup, also don't need the other tasks it provides
25 load_package_task
26
b6c8910 @mdkent Have to use the bootstrap build afterall, github downloads come with
authored
27 Rake::Task[ "package" ].invoke
28
29 # Package again, chef-solo requires cookbooks/ in path (CHEF-2001)
30 chdir(PACKAGE_DIR) do
31 rm_f File.join("#{PACKAGE_FULL}.tar.gz")
32 chdir(PACKAGE_FULL) do
33 sh %{mkdir cookbooks}
34 sh %{mv -f * cookbooks || :}
7e998db @mdkent Further doc updates.
authored
35 sh %{tar zcvf ../#{PACKAGE_FULL}.tar.gz cookbooks}
b6c8910 @mdkent Have to use the bootstrap build afterall, github downloads come with
authored
36 end
37 end
38 end
Something went wrong with that request. Please try again.