Slightly restructure rake helper files

Ref #4282
This commit is contained in:
Parker Moore 2015-12-26 12:53:30 -05:00
parent 75be388487
commit 57613b31dd
5 changed files with 26 additions and 21 deletions

View File

@ -7,7 +7,7 @@ require 'yaml'
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), *%w[lib]))
require 'jekyll/version'
Dir.glob('lib/tasks/**.rake').each { |f| import f }
Dir.glob('rake/**.rake').each { |f| import f }
#############################################################################
#

View File

@ -1,27 +1,9 @@
#############################################################################
#
# Packaging tasks for jekyll-docs
# Analyze the quality of the Jekyll source code (requires Docker)
#
#############################################################################
namespace :docs do
desc "Release #{docs_name} v#{version}"
task :release => :build do
unless `git branch` =~ /^\* master$/
puts "You must be on the master branch to release!"
exit!
end
sh "gem push pkg/#{docs_name}-#{version}.gem"
end
desc "Build #{docs_name} v#{version} into pkg/"
task :build do
mkdir_p "pkg"
sh "gem build #{docs_name}.gemspec"
sh "mv #{docs_name}-#{version}.gem pkg"
end
end
task :analysis do
require "jekyll/utils/ansi"
require "open3"
@ -57,4 +39,4 @@ task :analysis do
end
file.close
end
end

23
rake/docs.rake Normal file
View File

@ -0,0 +1,23 @@
#############################################################################
#
# Packaging tasks for jekyll-docs
#
#############################################################################
namespace :docs do
desc "Release #{docs_name} v#{version}"
task :release => :build do
unless `git branch` =~ /^\* master$/
puts "You must be on the master branch to release!"
exit!
end
sh "gem push pkg/#{docs_name}-#{version}.gem"
end
desc "Build #{docs_name} v#{version} into pkg/"
task :build do
mkdir_p "pkg"
sh "gem build #{docs_name}.gemspec"
sh "mv #{docs_name}-#{version}.gem pkg"
end
end