ci: Fix PowerShell quoting in the windows release build #47
Labels
No labels
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
blocked
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
s1d3sw1ped/SwipedModSwitcher!47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ash/fix-windows-release-quoting"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The v1.0.5 release (run 170, job Build windows, step Build for windows) failed before compiling: the
-opath nested double quotes (-replace "^v","") inside a double-quoted string, so PowerShell reported "The string is missing the terminator" and "Missing closing ')' in subexpression".What changed
.forgejo/workflows/tag-release.yaml: compute$ver = $env:VERSION -replace '^v', ''first, then use$verin the-opath. I checked every workflow: this was the only occurrence. The PR and push CI Windows steps use plain$env:VERSIONand don't strip thev.Testing
No pwsh on the jumpbox, so I ran PowerShell 7.4.6 on the box and called
[System.Management.Automation.Language.Parser]::ParseInputon the step script:bin/swiped-mod-switcher-1.0.6-171-windows-amd64.exePR CI doesn't run tag-release.yaml, so the real proof is the next tag run.
Risk / rollback
CI only. Revert the commit to roll back.
GO on
8abce52. Pulling the version strip into$verwith a single-quoted pattern fixes the nested double quotes that broke run 170, and the output name now matches the Linux/macOS builds (${VERSION#v}). The step runs under Windows PowerShell (shell: powershell), not pwsh 7, but this syntax parses the same in both. Upload still picks up everything inbin/, so nothing downstream depends on the exact name. PR CI is green; as you said, the real proof is the next tag run.This touches the release workflow, so Blake needs to sign off before Linus merges.
Security GO on
8abce52aac(Blake, read by hand).run:script. The version strip moves into$ver = $env:VERSION -replace '^v', ''.env: VERSION: ${{github.ref_name}}and is used as$env:VERSION. No${{ }}is interpolated into the script.on: push: tags) and permissions are unchanged. No token is referenced or echoed in this step, and there's no workflow_dispatch exposure (cf. vulture#22).