Skip to content

Commit

Permalink
Move Rake tasks to rakelib directory
Browse files Browse the repository at this point in the history
This commit moves all Rake tasks not defined in the Rakefile to a new
rakelib directory, where Rake will autodiscover and import those tasks.
Additionally, I've removed old logic in the Rakefile that manually
specified where to find and how to import those tasks.
  • Loading branch information
mhashizume committed Apr 25, 2024
1 parent fa213f5 commit 5e4b124
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# Rakefile for Puppet -*- ruby -*-
RAKE_ROOT = File.dirname(__FILE__)

# We need access to the Puppet.version method
$LOAD_PATH.unshift(File.expand_path("lib"))
require 'puppet/version'

$LOAD_PATH << File.join(RAKE_ROOT, 'tasks')

begin
require 'rubygems'
require 'rubygems/package_task'
Expand All @@ -21,8 +18,6 @@ end
require 'rake'
require 'open3'

Dir['tasks/**/*.rake'].each { |t| load t }

if Rake.application.top_level_tasks.grep(/^(pl:|package:)/).any?
begin
require 'packaging'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5e4b124

Please sign in to comment.