(packaging) Use the packaging loader for tasks
The packaging repo now uses an explicit loader which handles loading the
various rake tasks in packaging. This commit updates the facter Rakefile to use
the loader instead of a blind glob of the ext/packaging/tasks directory. We
move this load into the rescue LoadError block because the packaging repo won't
always be there, and require 'rake' ahead of time.
Moses Mendoza
10 years ago
5 | 5 | |
6 | 6 | $LOAD_PATH << File.join(File.dirname(__FILE__), 'tasks') |
7 | 7 | |
8 | require 'rake' | |
9 | ||
8 | 10 | begin |
11 | load File.join(File.dirname(__FILE__), 'ext', 'packaging', 'packaging.rake') | |
9 | 12 | require 'rubygems' |
10 | 13 | require 'rspec' |
11 | 14 | require 'rspec/core/rake_task' |
13 | 16 | rescue LoadError |
14 | 17 | end |
15 | 18 | |
16 | require 'rake' | |
17 | ||
18 | 19 | Dir['tasks/**/*.rake'].each { |t| load t } |
19 | Dir['ext/packaging/tasks/**/*'].sort.each { |t| load t } | |
20 | 20 | |
21 | 21 | build_defs_file = 'ext/build_defaults.yaml' |
22 | 22 | if File.exist?(build_defs_file) |