Skip to content

Commit

Permalink
fix multiple signatures ending up in release json
Browse files Browse the repository at this point in the history
  • Loading branch information
Raicuparta committed Nov 9, 2024
1 parent 7ab80c5 commit 1c82890
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions publish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,23 @@ function CheckEnvVar {
CheckEnvVar -Var "TAURI_SIGNING_PRIVATE_KEY"
CheckEnvVar -Var "TAURI_SIGNING_PRIVATE_KEY_PASSWORD"

npm run build

# Folder where the msi bundle will end up.
$msiFolder = "./backend/target/release/bundle/msi"

# Delete everything in the msi folder first.
Remove-Item $msiFolder -Force -Recurse -ErrorAction Ignore | Out-Null

npm run build

# Get built msi file name.
$msiName = (Get-ChildItem -Path $msiFolder -Filter "*.msi" | Select-Object -First 1).Name

# Extract version number from file name.
$version = [regex]::Match($msiName, '.+_(.+)_.+_.+').Groups[1].Value

# Read signature from sig file.
$signature = Get-Content -Path "$msiFolder/*.sig" -Raw
# Read signature from sig file. We deleted everything in this folder before,
# so we're pretty sure nothing other the newly created zip.sig should be found.
$signature = Get-Content -Path "$msiFolder/*zip.sig" -Raw

# Read changelog from environment variable.
$changelog = $env:RAI_PAL_CHANGELOG ?? "Someone forgot to include a changelog."
Expand Down

0 comments on commit 1c82890

Please sign in to comment.