-
Notifications
You must be signed in to change notification settings - Fork 28
/
rakefile.rb
43 lines (37 loc) · 1.26 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
require 'rubygems'
require 'albacore'
require 'version_bumper'
APPLICATION_NAME = 'BarcodeSimulator'
APPLICATION_TITLE = 'Barcode Simulator'
SOLUTION_FILE = 'BarcodeSimulator.sln'
PROJECT_DIR = 'BarcodeSimulator'
COMPANY = 'Michael Roach'
COPYRIGHT = 'None'
BUILD_CONFIGURATION = "Release"
BUILD_PROPERTIES = {
:configuration => BUILD_CONFIGURATION,
:nowarn => "1573;1572;1591;1574", # suppresses XML comment warnings which we don't care about
}
def buildnumber
bumper_version.to_s
end
task :default => ["bump:build", :build]
assemblyinfo :assemblyinfo do |asm|
asm.version = buildnumber
asm.company_name = COMPANY
asm.product_name = APPLICATION_NAME
asm.copyright = COPYRIGHT
asm.title = APPLICATION_TITLE
asm.description = APPLICATION_TITLE
asm.output_file = "#{PROJECT_DIR}/Properties/AssemblyInfo.cs"
end
msbuild :build => [:assemblyinfo] do |msb|
msb.targets :clean, :build
msb.solution = SOLUTION_FILE
msb.properties = BUILD_PROPERTIES
msb.verbosity = "minimal"
end
task :package => ["bump:revision", :build] do
Dir.mkdir('releases') unless Dir.exists?('releases')
FileUtils.cp("#{PROJECT_DIR}/bin/#{BUILD_CONFIGURATION}/#{APPLICATION_NAME}.exe", "releases/#{APPLICATION_NAME}-v#{buildnumber}.exe")
end