forked from bhollis/maruku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
67 lines (51 loc) · 1.52 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
require 'rubygems'
require 'rubygems/gem_runner'
#Gem::manage_gems
#require 'rake/gempackagetask'
require 'rubygems/package_task'
require_relative 'maruku_gem'
task :default => [:package]
Gem::PackageTask.new($spec) do |pkg|
pkg.need_zip = true
pkg.need_tar = true
end
PKG_NAME = 'maruku'
PKG_FILE_NAME = "#{PKG_NAME}-#{MaRuKu::Version}"
RUBY_FORGE_PROJECT = PKG_NAME
RUBY_FORGE_USER = 'andrea'
RELEASE_NAME = MaRuKu::Version
RUBY_FORGE_GROUPID = '2795'
RUBY_FORGE_PACKAGEID = '3292'
desc "Publish the release files to RubyForge."
task :release => [:gem, :package] do
system("rubyforge login --username #{RUBY_FORGE_USER}")
gem = "pkg/#{PKG_FILE_NAME}.gem"
# -n notes/#{Maruku::Version}.txt
cmd = "rubyforge add_release %s %s \"%s\" %s" %
[RUBY_FORGE_GROUPID, RUBY_FORGE_PACKAGEID, RELEASE_NAME, gem]
puts cmd
system(cmd)
files = ["gem", "tgz", "zip"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" }
files.each do |file|
# system("rubyforge add_file %s %s %s %s" %
# [RUBY_FORGE_GROUPID, RUBY_FORGE_PACKAGEID, RELEASE_NAME, file])
end
end
begin
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new
rescue LoadError => e
end
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
files = [#'README', 'LICENSE', 'COPYING',
'lib/**/*.rb',
'rdoc/*.rdoc'#, 'test/*.rb'
]
rdoc.rdoc_files.add(files)
rdoc.main = "rdoc/main.rdoc" # page to start on
rdoc.title = "Maruku Documentation"
rdoc.template = "jamis.rb"
rdoc.rdoc_dir = 'doc' # rdoc output folder
rdoc.options << '--line-numbers' << '--inline-source'
end