diff --git a/Build.ps1 b/Build.ps1 index e5ca712..b47beb8 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -12,6 +12,13 @@ Function GetMSBuildExe { Return $MSBuildExe } +Function ZipFiles($Filename, $Source) +{ + Add-Type -Assembly System.IO.Compression.FileSystem + $CompressionLevel = [System.IO.Compression.CompressionLevel]::Optimal + [System.IO.Compression.ZipFile]::CreateFromDirectory($Source, $Filename, $CompressionLevel, $false) +} + &(GetMSBuildExe) GoToWindow.sln ` /t:Clean`;Rebuild ` /p:Configuration=Release ` @@ -19,4 +26,12 @@ Function GetMSBuildExe { /p:DebugSymbols=false ` /p:DebugType=None ` /clp:ErrorsOnly ` - /v:m \ No newline at end of file + /v:m + +$ReleaseFolder = "$PSScriptRoot\Release" + +If(!(Test-Path -Path $ReleaseFolder )){ + New-Item -ItemType directory -Path $ReleaseFolder +} + +ZipFiles "$ReleaseFolder\GoToWindow.zip" "$PSScriptRoot\GoToWindow\bin\Release" \ No newline at end of file