Skip to content

Commit

Permalink
chore: fix ps1 script call
Browse files Browse the repository at this point in the history
  • Loading branch information
neilcampbell committed Feb 26, 2024
1 parent fbf828c commit 54bfbea
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/actions/build-binaries/windows/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ runs:
shell: pwsh
run: |
& .\scripts\winget\build-installer.ps1 `
-binaryDir ${{ env.BINARY_BUILD_DIR }} `
-releaseVersion ${{ inputs.version }} `
-outputFile ${{ env.WINGET_INSTALLER }}
-binaryDir '${{ env.BINARY_BUILD_DIR }}' `
-releaseVersion '${{ inputs.version }}' `
-outputFile '${{ env.WINGET_INSTALLER }}'
- name: Sign winget installer
if: ${{ inputs.production_release == 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-release-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ jobs:
echo 'Publishing to winget'
# The below can be uncommented after we've manually created the first release on winget
# & .\scripts\winget\update-package.ps1 `
# -releaseVersionTag ${{ inputs.release }}
# -releaseVersionTag '${{ inputs.release }}'
15 changes: 11 additions & 4 deletions scripts/winget/build-installer.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
Param(
[Parameter(Mandatory=$true)]
[Parameter(Mandatory = $true)]
[String]
$binaryDir,

[Parameter(Mandatory=$true)]
[Parameter(Mandatory = $false)]
[AllowEmptyString()]
[String]
$releaseVersion,

[Parameter(Mandatory=$true)]
[Parameter(Mandatory = $true)]
[String]
$outputFile
)
Expand All @@ -30,7 +31,13 @@ $assetsDir = New-Item -ItemType Directory -Path (Join-Path $buildDir assets)
Copy-Item -Path "$installerContentDir\assets\*" -Destination $assetsDir -Recurse | Out-Null

# Add manifest file
$version = if ($releaseVersion) { $releaseVersion -replace '-\w+|\+.+$', '' } else { '0.0.1.0' } # Strip the pre-release meta, as it's not valid
$version = if ($releaseVersion) {
# Strip the pre-release meta, as it's not valid
$releaseVersion -replace '-\w+|\+.+$', ''
}
else {
'0.0.1'
}
(Get-Content (Resolve-Path "$installerContentDir\AppxManifest.xml")).Replace('0.0.1.0', $("$version.0")) | Set-Content (Join-Path $buildDir AppxManifest.xml)

# Generate pri resource map for installer assets
Expand Down

0 comments on commit 54bfbea

Please sign in to comment.