Repository navigation
fix(security): build native MCPorter releases with Bun 1.4.4 #464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f856208
fix(security): build native MCPorter releases with Bun 1.4.4
joshavant bb20b6b
fix(release): reject affected Bun compilers and provenance
joshavant 4307fdc
fix: admit the patched compiler before native generation
joshavant 2138385
fix(release): qualify patched native builds on every platform
steipete File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| $ErrorActionPreference = 'Stop' | ||
| $root = Split-Path $PSScriptRoot -Parent | ||
| $stage = Join-Path $env:RUNNER_TEMP 'native-windows-x64' | ||
| $smoke = Join-Path $env:RUNNER_TEMP 'smoke-windows-x64' | ||
| New-Item -ItemType Directory -Force $stage, $smoke | Out-Null | ||
| Set-Location $root | ||
| $version = (Get-Content package.json | ConvertFrom-Json).version | ||
| $binary = Join-Path $stage 'mcporter.exe' | ||
| pnpm build:bun --target bun-windows-x64-baseline --output $binary | ||
| if ($LASTEXITCODE -ne 0) { throw 'Windows native build failed' } | ||
| $archive = Join-Path $env:RUNNER_TEMP 'mcporter-dry-run-windows-x64.zip' | ||
| Compress-Archive -Path $binary -DestinationPath $archive -Force | ||
| Expand-Archive -Path $archive -DestinationPath $smoke -Force | ||
| $binary = Join-Path $smoke 'mcporter.exe' | ||
| $env:BUN_BE_BUN = '1' | ||
| try { | ||
| $metadata = & $binary --print 'JSON.stringify({bun: process.versions.bun, platform: process.platform, arch: process.arch})' | ||
| if ($LASTEXITCODE -ne 0) { throw 'Embedded runtime probe failed' } | ||
| $runtime = $metadata | ConvertFrom-Json | ||
| if ($runtime.bun -ne '1.4.4' -or $runtime.platform -ne 'win32' -or $runtime.arch -ne 'x64') { | ||
| throw "Unexpected embedded runtime: $metadata" | ||
| } | ||
| Write-Output "Embedded runtime: $metadata" | ||
| } finally { | ||
| Remove-Item Env:BUN_BE_BUN | ||
| } | ||
| Set-Location $smoke | ||
| $env:HOME = Join-Path $smoke 'home' | ||
| $env:USERPROFILE = $env:HOME | ||
| New-Item -ItemType Directory -Force $env:HOME | Out-Null | ||
| if ((& $binary --version) -ne $version -or $LASTEXITCODE -ne 0) { throw 'Native version mismatch' } | ||
| & $binary --help | ||
| if ($LASTEXITCODE -ne 0) { throw 'Native help failed' } | ||
| '{"mcpServers":{}}' | Set-Content -Path empty.json | ||
| & $binary --config (Join-Path $smoke 'empty.json') list --json | ||
| if ($LASTEXITCODE -ne 0) { throw 'Native synthetic config smoke failed' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.