2

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

Package

$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\

Releasify

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?

Link to GitHub open issue

Artexias
  • 195
  • 2
  • 14
  • for me this happened after changing `.rc` file of project , i added a dynamic build number into version `1.1.1.20` which is last number i changed it to zero and problem solved i guess squirrel dont support more than 3 digit version number – Mahdi Khalili Aug 31 '19 at 07:52
  • if you read squirrel log file which is inside squirrel directory `SquirrelSetup.log` you can see whats wrong with code you executed – Mahdi Khalili Aug 31 '19 at 08:00

1 Answers1

0

@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.

Artexias
  • 195
  • 2
  • 14