Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jekyll-docs gem should be easily integrated with jekyll's site. #4152

Merged
merged 1 commit into from Nov 18, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 29 additions & 1 deletion Rakefile
Expand Up @@ -14,13 +14,17 @@ require 'jekyll/version'
#############################################################################

def name
'jekyll'.freeze
"jekyll"
end

def version
Jekyll::VERSION
end

def docs_name
"#{name}-docs"
end

def gemspec_file
"#{name}.gemspec"
end
Expand Down Expand Up @@ -301,3 +305,27 @@ task :build do
sh "gem build #{gemspec_file}"
sh "mv #{gem_file} pkg"
end

#############################################################################
#
# 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
22 changes: 22 additions & 0 deletions jekyll-docs.gemspec
@@ -0,0 +1,22 @@
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'jekyll/version'

Gem::Specification.new do |spec|
spec.name = 'jekyll-docs'
spec.version = Jekyll::VERSION
spec.authors = ['Parker Moore']
spec.email = ['parkrmoore@gmail.com']
spec.summary = %q{Offline usage documentation for Jekyll.}
spec.homepage = 'http://jekyllrb.com'
spec.license = 'MIT'

spec.files = `git ls-files -z`.split("\x0").grep(%r{^site/})
spec.require_paths = ['lib']

spec.add_dependency 'jekyll', Jekyll::VERSION

spec.add_development_dependency 'bundler', '~> 1.7'
spec.add_development_dependency 'rake', '~> 10.0'
end