Skip to content

Commit

Permalink
Changed publish to use msbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
tznind committed Oct 1, 2019
1 parent 1e6e4f2 commit 83fbe24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions TemplateBuilder/TemplateBuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net461</TargetFramework>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
<AssemblyTitle>TemplateBuilder</AssemblyTitle>
<Product>TemplateBuilder</Product>
<Copyright>Copyright © 2018</Copyright>
Expand Down
15 changes: 7 additions & 8 deletions rakefile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
load 'rakeconfig.rb'
$MSBUILD15CMD = MSBUILD15CMD.gsub(/\\/,"/")

task :release => [:assemblyinfo, :build_release, :build_cli, :github]
task :release => [:assemblyinfo, :build_release, :github]

task :restorepackages do
sh "nuget restore #{SOLUTION}"
Expand All @@ -15,19 +15,18 @@
sh "\"#{$MSBUILD15CMD}\" #{SOLUTION} \/t:Clean;Build \/p:Configuration=#{args.config}"
end

task :build_release => :restorepackages do
sh "\"#{$MSBUILD15CMD}\" #{SOLUTION} \/t:Clean;Build \/p:Configuration=Release"
end

task :build_cli => :restorepackages do
task :build_release => :restorepackages do
Dir.chdir("TemplateBuilder/") do
sh "dotnet publish -r win-x64 -c Release -o Publish"
Dir.chdir("Publish/") do
sh "\"#{$MSBUILD15CMD}\" TemplateBuilder.csproj \/t:Publish \/p:Configuration=Release;RuntimeIdentifiers=win-x64"

Dir.chdir("bin/Release/net461/publish/") do
sh "#{SQUIRREL}/signtool.exe sign /a /s MY /n \"University of Dundee\" /fd sha256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td sha256 /v *.dll"
sh "#{SQUIRREL}/signtool.exe sign /a /s MY /n \"University of Dundee\" /fd sha256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td sha256 /v *.exe"
end

end
sh "powershell.exe -nologo -noprofile -command \"& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::CreateFromDirectory('TemplateBuilder/Publish', 'TemplateBuilder/templatebuilder-win-x64.zip'); }\""
sh "powershell.exe -nologo -noprofile -command \"& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::CreateFromDirectory('TemplateBuilder/bin/Release/net461/publish', 'TemplateBuilder/templatebuilder-win-x64.zip'); }\""
end

desc "Sets the version number from SharedAssemblyInfo file"
Expand Down

0 comments on commit 83fbe24

Please sign in to comment.