-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathRakefile
53 lines (43 loc) · 1.05 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
#!/usr/bin/env ruby"
require 'rake/clean'
require 'rake/testtask'
require 'rdoc/task'
require './lib/re'
task :default => :test
Rake::TestTask.new(:test) do |t|
t.warning = true
t.verbose = false
t.test_files = FileList['test/*_test.rb']
end
namespace "release" do
task :new => [
:readme,
:check_non_beta,
:check_all_committed,
:tag_version,
"publish:rdoc",
"publish:gem",
]
task :check_all_committed do
status = `git status`
unless status =~ /nothing to commit/
fail "Outstanding Git Changes:\n#{status}"
end
end
task :commit_new_version do
sh "git commit -m 'bumped to version #{Re::VERSION}'"
end
task :not_already_tagged do
if `git tag -l re-#{Re::VERSION}` != ""
fail "Already tagged with re-#{Re::VERSION}"
end
end
task :tag_version => :not_already_tagged do
sh "git tag re-#{Re::VERSION}"
sh "git push --tags"
end
task :check_non_beta do
fail "Must not be a beta version! Version is #{Re::VERSION}" if Re::Version::BETA
end
end
task :release => "release:new"