-
Notifications
You must be signed in to change notification settings - Fork 151
/
Copy pathrakefile.rb
128 lines (95 loc) · 3.9 KB
/
rakefile.rb
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
require 'bundler/setup'
require 'fuburake'
@solution = FubuRake::Solution.new do |sln|
sln.compile = {
:solutionfile => 'src/FubuMVC.sln'
}
sln.assembly_info = {
:product_name => "FubuMVC",
:copyright => 'Copyright 2008-2014 Jeremy D. Miller, Joshua Arnold, Corey Kaylor, Joshua Flanagan, et al. All rights reserved.'
}
sln.ripple_enabled = true
sln.fubudocs_enabled = false
sln.bottles_enabled = false # has to be all special in FubuMVC because of the zip package testing
#sln.integration_test = ['FubuMVC.IntegrationTesting', 'Serenity.Testing']
sln.integration_test = ['FubuMVC.IntegrationTesting']
sln.ci_steps = [:integration_test, :storyteller, :archive_gem]
sln.options[:nuget_publish_folder] = 'nupkgs'
sln.options[:nuget_publish_url] = 'https://www.myget.org/F/fubumvc-edge/'
end
FubuRake::BottleServices.new({
:dir => "src/DiagnosticsHarness/bin/#{@solution.compilemode}",
:name => 'ft-harness',
:local_service => true,
:manual => true
})
FubuRake::MvcApp.new({:directory => 'src/DiagnosticsHarness', :name => 'harness'})
add_dependency 'ripple:publish', :integration_test
desc "Unit and Integration Tests"
task :full => [:default, :integration_test]
desc "Target used for CI on Mono"
task :mono_ci => [:compile, :unit_test, :integration_test]
desc "Delegates to npm install and builds the javascript for diagnostics"
task :npm do
sh 'npm install'
sh 'npm run build'
end
add_dependency :compile, :npm
desc "Replaces the existing installed gem with the new version for local testing"
task :local_gem => [:create_gem] do
sh 'gem uninstall fubu -a -x'
Dir.chdir 'pkg' do
sh 'gem install fubu'
end
end
desc "Moves the gem to the archive folder"
task :archive_gem => [:create_gem] do
copyOutputFiles "pkg", "*.gem", "artifacts"
end
desc "Run the storyteller specifications"
task :storyteller => [:compile] do
sh "src/packages/Storyteller/tools/st.exe run src/FubuMVC.IntegrationTesting --retries 3"
end
desc "Run the storyteller specifications"
task :open_st => [:compile] do
sh "src/packages/Storyteller/tools/st.exe open src/FubuMVC.IntegrationTesting"
end
desc "Outputs the command line usage"
task :dump_usages => [:compile] do
sh "src/Fubu/bin/#{@solution.compilemode}/fubu.exe dump-usages fubu src/Fubu.Docs/fubu.cli.xml"
end
desc "Creates the gem for fubu.exe"
task :create_gem => [:compile] do
require "rubygems/package"
cleanDirectory 'bin';
cleanDirectory 'pkg'
Dir.mkdir 'artifacts' unless Dir.exists?('artifacts')
Dir.mkdir 'bin' unless Dir.exists?('bin')
Dir.mkdir 'pkg' unless Dir.exists?('pkg')
copyOutputFiles "src/Fubu/bin/#{@solution.compilemode}", '*.dll', 'bin'
copyOutputFiles "src/Fubu/bin/#{@solution.compilemode}", 'Fubu.exe', 'bin'
copyOutputFiles "src/Fubu/bin/#{@solution.compilemode}", 'chromedriver.exe', 'bin'
FileUtils.cp_r 'templates', 'bin'
FileUtils.copy 'fubu', 'bin'
spec = Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'fubu'
s.version = @solution.options[:build_number] + '.alpha'
s.files = Dir['bin/**/*']
s.bindir = 'bin'
s.executables << 'fubu'
s.summary = 'Command line tools for FubuMVC development'
s.description = 'Command line tools for FubuMVC development'
s.add_runtime_dependency "rake",["~>10.0"]
s.add_runtime_dependency "bundler",[">=1.3.5"]
s.authors = ['Jeremy D. Miller', 'Josh Arnold', 'Chad Myers', 'Joshua Flanagan']
s.email = 'fubumvc-devel@googlegroups.com'
s.homepage = 'http://fubu-project.org'
s.rubyforge_project = 'fubu'
end
puts "ON THE FLY SPEC FILES"
puts spec.files
puts "=========="
Gem::Package::build spec, true
FileUtils.mv "fubu-#{@solution.options[:build_number]}.alpha.gem", "pkg/fubu-#{@solution.options[:build_number]}.alpha.gem"
end