forked from im-richard/Scaffold
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
42 lines (34 loc) · 954 Bytes
/
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
require "rubygems"
require "rake"
DIRDOCS = "docs"
DIRTESTS = "tests"
DIRLIB = "lib"
task :default => [:docs, :tests]
desc "Recreates the documentation using PHPDoc"
task :docs do
system("rm -Rf #{DIRDOCS}")
system("phpdoc -t #{DIRDOCS} -o HTML:default:default -d #{DIRLIB}")
end
desc "Runs PHPUnit"
task :tests do
system("rm -Rf #{DIRTESTS}/log/*")
system("cd #{DIRTESTS}; phpunit --configuration phpunit.xml --verbose; cd ..;")
end
desc "Opens the documentation"
task :doc do
system("open #{DIRDOCS}/index.html")
end
desc "Opens the reports log"
task :report do
system("open #{DIRTESTS}/log/report/index.html")
end
desc "Creates a new release from the current tag"
task :release, :tag do |t, args|
tag = args[:tag]
system("git archive #{tag} --prefix=scaffold/ --format=zip > ../Releases/scaffold-#{tag}.zip")
end
desc "Creates a new tag"
task :tag, :version do |t,args|
version = args[:version]
system("git tag #{version}")
end