Skip to content

Commit 545e58c

Browse files
committed
Pin WiX release tooling
1 parent df32077 commit 545e58c

3 files changed

Lines changed: 26 additions & 17 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Install packaging tools
3030
shell: pwsh
3131
run: |
32-
dotnet tool install --global wix
32+
dotnet tool install --global wix --version 6.0.2
3333
"$env:USERPROFILE\.dotnet\tools" >> $env:GITHUB_PATH
3434
choco install innosetup --yes --no-progress
3535

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: Install packaging tools
4343
shell: pwsh
4444
run: |
45-
dotnet tool install --global wix
45+
dotnet tool install --global wix --version 6.0.2
4646
"$env:USERPROFILE\.dotnet\tools" >> $env:GITHUB_PATH
4747
choco install innosetup --yes --no-progress
4848

scripts/publish-release.ps1

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ param(
77

88
[string] $ProductVersion,
99

10-
[switch] $SkipInstallers
10+
[switch] $SkipInstallers,
11+
12+
[switch] $SkipSetupExe,
13+
14+
[switch] $SkipMsi
1115
)
1216

1317
$ErrorActionPreference = "Stop"
@@ -97,7 +101,7 @@ function New-ToastDeskMsi([string] $version) {
97101
$index = 0
98102

99103
Get-ChildItem -Path $publishDir -File -Recurse | Sort-Object FullName | ForEach-Object {
100-
$relativePath = [System.IO.Path]::GetRelativePath($publishDir, $_.FullName)
104+
$relativePath = $_.FullName.Substring($publishDir.TrimEnd("\").Length + 1)
101105
$relativeDirectory = Split-Path -Parent $relativePath
102106
$directoryId = switch ($relativeDirectory) {
103107
"" { "INSTALLFOLDER" }
@@ -165,7 +169,7 @@ $componentRefXml
165169
"@
166170

167171
Set-Content -Path $wxsPath -Value $wxs -Encoding UTF8
168-
& $wixCommand.Source build $wxsPath -arch x64 -out $setupMsiPath
172+
& $wixCommand.Source build $wxsPath -arch x64 -pdbtype none -out $setupMsiPath
169173
}
170174

171175
$resolvedVersion = Get-ProductVersion
@@ -207,23 +211,28 @@ if (Test-Path $zipPath) {
207211
Compress-Archive -Path (Join-Path $publishDir "*") -DestinationPath $zipPath
208212

209213
if (-not $SkipInstallers) {
210-
$isccPath = Get-IsccPath
211-
if (-not $isccPath) {
212-
throw "Inno Setup compiler was not found. Install Inno Setup 6 or run with -SkipInstallers."
213-
}
214+
if (-not $SkipSetupExe) {
215+
$isccPath = Get-IsccPath
216+
if (-not $isccPath) {
217+
throw "Inno Setup compiler was not found. Install Inno Setup 6 or run with -SkipInstallers."
218+
}
214219

215-
& $isccPath "/DMyAppVersion=$resolvedVersion" $innoScriptPath
220+
& $isccPath "/DMyAppVersion=$resolvedVersion" $innoScriptPath
216221

217-
$builtSetupExe = Get-ChildItem -Path $installerDir -File -Filter "ToastDesk-Setup-*.exe" |
218-
Sort-Object LastWriteTime -Descending |
219-
Select-Object -First 1
222+
$builtSetupExe = Get-ChildItem -Path $installerDir -File -Filter "ToastDesk-Setup-*.exe" |
223+
Sort-Object LastWriteTime -Descending |
224+
Select-Object -First 1
220225

221-
if (-not $builtSetupExe) {
222-
throw "Inno Setup did not create a setup executable."
226+
if (-not $builtSetupExe) {
227+
throw "Inno Setup did not create a setup executable."
228+
}
229+
230+
Move-Item -LiteralPath $builtSetupExe.FullName -Destination $setupExePath -Force
223231
}
224232

225-
Move-Item -LiteralPath $builtSetupExe.FullName -Destination $setupExePath -Force
226-
New-ToastDeskMsi $resolvedVersion
233+
if (-not $SkipMsi) {
234+
New-ToastDeskMsi $resolvedVersion
235+
}
227236
}
228237

229238
$packages = Get-ChildItem -Path $releaseDir -File | Where-Object { $_.Extension -in ".zip", ".exe", ".msi" } | Sort-Object Name

0 commit comments

Comments
 (0)