forked from ResourceDataInc/Centroid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
88 lines (74 loc) · 2.33 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
require "bundler/setup"
require "albacore"
desc "Build everything"
build :build do |cmd|
cmd.sln = "dot-net/Centroid.sln"
end
namespace :package do
directory "dot-net/build/pkg"
desc "Package .NET"
nugets_pack :cs => ["dot-net/build/pkg", :test] do |cmd|
FileList["dot-net/build/pkg/*.nupkg"].each {|f| File.delete(f) }
cmd.exe = "dot-net/build/support/NuGet.exe"
cmd.out = "dot-net/build/pkg"
cmd.files = ["dot-net/Centroid/Centroid.csproj"]
cmd.with_metadata do |m|
m.id = "Centroid"
m.summary = "A centralized paradigm to configuration management."
m.description = "Centroid is a tool for loading configuration values declared in JSON, and accessing those configuration values using object properties."
m.authors = "Resource Data, Inc."
m.version = "1.1.0"
m.license_url = "https://github.com/ResourceDataInc/Centroid/blob/master/LICENSE.txt"
m.project_url = "https://github.com/ResourceDataInc/Centroid"
end
cmd.gen_symbols
end
desc "Package Python"
task :py do
system "cd python && python setup.py sdist"
end
desc "Package Ruby"
task :rb do
system "git clean *.gem -fx && cd ruby && gem build centroid.gemspec"
end
end
desc "Package everything"
task :package => ["package:cs", "package:py", "package:rb"]
namespace :release do
desc "Release .NET package"
task :cs => ["package:cs"] do
Dir.glob("dot-net/build/pkg/*.nupkg") do |f|
system "dot-net/build/support/NuGet.exe", ["push", f], :clr_command => true
end
end
desc "Release Python package"
task :py do
system "cd python && python setup.py sdist upload"
end
desc "Release Ruby package"
task :rb => ["package:rb"] do
Dir['ruby/*.gem'].each do |f|
system "gem push #{f}"
end
end
end
desc "Release everything"
task :release => ["release:cs", "release:py", "release:rb"]
namespace :test do
desc "Test .NET"
test_runner :cs => [:build] do |cmd|
cmd.exe = "dot-net/packages/NUnit.Runners.2.6.3/tools/nunit-console.exe"
cmd.files = ["dot-net/Centroid.Tests/bin/Debug/Centroid.Tests.dll"]
end
desc "Test python"
task :py do
system "python -m unittest python.tests"
end
desc "Test ruby"
task :rb do
system "ruby ruby/test/centroid_test.rb"
end
end
desc "Test everything"
task :test => ["test:cs", "test:py", "test:rb"]
task :default => :test