/
Rakefile
39 lines (33 loc) · 927 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
require 'semver'
v = SemVer.find
task :build do
sh "xbuild JsonFSharp.sln"
end
task :test => [:build] do
sh "mono JsonFSharp.Specs/bin/Debug/JsonFSharp.Specs.exe"
end
task :pack => :test do
raise "Nuget api key not set!" unless ENV['nuget_apikey']
sh "nuget pack -Version #{v.format "%M.%m.%p%s%d"} JsonFSharp/JsonFSharp.nuspec"
sh "git tag #{v.to_s}"
sh "git push --tags"
sh "nuget push JsonFSharp.#{v.format "%M.%m.%p%s%d"}.nupkg #{ENV['nuget_apikey']} -Source https://www.nuget.org/api/v2/package"
v.patch += 1
v.save
sh "git add .semver"
sh "git commit -m \"bump to version #{v.to_s}\""
sh "git push"
end
task :increment_minor do
v.minor += 1
v.save
sh "git add .semver"
sh "git commit -m \"bump to version #{v.to_s}\""
sh "git push"
end
task :restore do
sh "mono paket.bootstrapper.exe"
sh "mono paket.exe restore"
end
task :ci_build => [:restore, :test]
task :default => :test