Created
November 13, 2015 15:33
-
-
Save Gimly/359a8f1c26e5d0ca3097 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$True)] | |
[string]$packageFolder, | |
[Parameter(Mandatory=$True)] | |
[string]$releaseFolder, | |
[Parameter(Mandatory=$True)] | |
[string]$signCertPassword | |
) | |
Set-Alias signtool 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\SignTool.exe' | |
Set-Alias Squirrel '.\packages\squirrel.windows.1.0.4\tools\Squirrel.exe' | |
# Regular expression pattern to find the version in the build number | |
$VersionRegex = "\d+\.\d+\.\d+\.\d+" | |
$VersionData = [regex]::matches($Env:BUILD_BUILDNUMBER,$VersionRegex) | |
$NugetPackageFileName = "MyApp."+$VersionData+".nupkg" | |
Write-Host "Starting Squirrel releasify on" $packageFolder\$NugetPackageFileName "release directory:" $releaseFolder | |
Squirrel --releasify $packageFolder\$NugetPackageFileName --releaseDir $releaseFolder | Write-Output | |
Write-Host "Signing the Squirrel setup.exe" | |
signtool sign /t http://timestamp.digicert.com /f ".\MyAppKey.pfx" /p $signCertPassword .\$releaseFolder\Setup.exe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment