Created
January 6, 2012 07:04
-
-
Save nomadalex/1569456 to your computer and use it in GitHub Desktop.
Rakefile for build, signing, release of Visual Studio project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MSBUILD = 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe' | |
MAKENSIS = '"C:\Program Files\NSIS\makensis"' | |
SIGNTOOL = '"C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\signtool.exe"' | |
CERTIFICATE = File.expand_path '../etc/sign.pfx' | |
task :default => :build | |
def sign files | |
files = [files] unless files.kind_of? Enumerable | |
sh "#{SIGNTOOL} sign /f #{CERTIFICATE} /p fakepassord123 /t http://timestamp.comodoca.com/authenticode #{files.join ' '}" | |
end | |
desc "Builds the Windows solution" | |
task :build do | |
sh MSBUILD | |
end | |
desc "Signs the application" | |
task :signbuild => :build do | |
Dir.chdir('Awareness/bin/Release') do | |
sign FileList['*.exe', '*.dll'] | |
end | |
end | |
desc "Signs the installer" | |
task :signinstaller => :installer do | |
sign '../etc/InstallAwareness.exe' | |
end | |
desc "Creates the Windows installer" | |
task :installer => :signbuild do | |
Dir.chdir("../etc") do | |
sh "#{MAKENSIS} InstallAwareness.nsi" | |
end | |
end | |
desc "Releases the installer to the live server" | |
task :release => :signinstaller do | |
sh "scp ../etc/InstallAwareness.exe iamfutureproof@iamfutureproof.com:iamfutureproof.com/..." | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment