I am using the Azure DevOps Release pipeline to deploy a WPF application.
In the CI I have a copy files task with a target to build.artifactstagingdirectory In the contents I include: - src\SolutionDirectory\ProjectDirectory\bin\$(BuildConfiguration)** - src\SolutionDirectory\ProjectDirectory\Release.nuspec - packages\squirrel.windows.1.8.0**
In the CD i have two PowerShell scrips. One to the package operation and another for releasifying
$exePath = "$(System.DefaultWorkingDirectory)/_ArtifactName/drop/src/SolutionDirectory/ProjectDirectory/bin/Release/Project.exe"
$version =$([System.Diagnostics.FileVersionInfo]::GetVersionInfo($exePath).FileVersion)
nuget pack .\Release.nuspec
-Version $version
-Properties Configuration=Release
-OutputDirectory .\bin\Release\
-BasePath .\bin\Release\
Set-Alias squirrel "$(System.DefaultWorkingDirectory)/_ArtifactName/drop/packages/squirrel.windows.1.**/tools/squirrel.exe"
$exePath = "$(System.DefaultWorkingDirectory)/_ArtifactName/drop/src/SolutionDirectory/ProjectDirectory/bin/Release/Project.exe"
$version =$([System.Diagnostics.FileVersionInfo]::GetVersionInfo($exePath).FileVersion )
squirrel --releasify "$(System.DefaultWorkingDirectory)/_ArtifactName/drop/src/SolutionDirectory/ProjectDirectory/bin/Release/Project.$version.nupkg" --no-msi --releaseDir $(DevDeployDir)
The DevDeployDir is a variable pointing to a local server deployment directory.
I am only able to releasify .nupkg. the RELEASES and Setup.exe are missing, i also tried to add a Start-Sleep command at the end because i was thinking the releasifying process might be stopping too early.No go.
Its like the powershell task on Azure DevOps is starting to run the Squirrel releasify in the backround but since squirrel is asynchronous(I was told so and looking through some bit of code it seems to be that way) it exits straight away and only a **.nupkg. and a **-full.nupkg are created. So i feel like its starting to transoform the package into a squirrel versioned one, but its stopping after the powershell command exits.
This does not happen when I manually releasify through powershell on the server driveI can see the files inside my working directory being generated in the following order
**.nupkg **-full.nupkg deletes **.nupkg creates Setup,exe optional Setup.msi
If anyone needs more info I would be glad to share. Does someone know if this is achievable?
@Mahdi Khalili
Yeah, it needs to be a semantic version and this is not during installation but during releasifying so the squirrel log will not work here I don't think.
We just used the wait and pass thru parameters to the powershell wrapper around the releasifying process. It all worked afterwards.