mirror of
https://github.com/DBDiff/DBDiff.git
synced 2026-04-25 13:25:49 +03:00
[PR #149] [MERGED] Fix Windows release pipeline and add PHAR fallback for all platformsFeature/fix win release 4 #280
Labels
No labels
bug
enhancement
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/DBDiff#280
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/DBDiff/DBDiff/pull/149
Author: @jasdeepkhalsa
Created: 3/7/2026
Status: ✅ Merged
Merged: 3/7/2026
Merged by: @jasdeepkhalsa
Base:
master← Head:feature/fix-win-release-4📝 Commits (3)
f12ef8efix: rename binaries to platform-specific names before GitHub Release upload8408a17feat: PHAR fallback in @dbdiff/cli for platforms without a native binary12c666dfeat: publish win32-arm64 as PHAR-fallback skeleton package📊 Changes
3 files changed (+76 additions, -20 deletions)
View changed files
📝
.github/workflows/release.yml(+39 -9)📝
packages/@dbdiff/cli/bin/dbdiff.js(+36 -11)📝
packages/@dbdiff/cli/package.json(+1 -0)📄 Description
Fix Windows release pipeline and add PHAR fallback for all platforms
Problem
Three issues were blocking a clean release:
GitHub Release upload failing with
Error: Not Found— all six Unix binaries share the filenamedbdiff.softprops/action-gh-releaseuploads by basename, so they collide to a single asset. On re-runs it tried to delete all six duplicates by ID, but by the 3rd–6th deletion the prior ones were already gone, causing a 404 that aborted the step. Previously uploaded assets were being silently deleted each re-run without replacement.Windows had no working binary — the SPC Windows build fails with 14 unresolved zlib linker symbols on x64, and SPC v2.8.2 hardcodes
phpsdk-vs17-x64.bat(which passesx64_amd64tovcvarsall.bat) making ARM64 builds impossible on ARM64 runners.@dbdiff/cli-win32-arm64was silently unpublished — the platform package skeleton existed but was being skipped during npm publish because it had no binary, leaving ARM64 Windows users with a failed install.Changes
release.ymldbdiff→dbdiff-linux-x64,dbdiff.exe→dbdiff-win32-x64.exe). Every release asset now has a unique name; re-runs delete and re-upload cleanly.@dbdiff/cli— copiesdbdiff.pharintopackages/@dbdiff/cli/before npm publish so it ships with everynpm install -g @dbdiff/cli.@dbdiff/cli-win32-arm64as a PHAR-fallback skeleton — adds aPHAR_FALLBACK_PKGSlist to the publish loop; packages in that list are published without a native binary rather than skipped.packages/@dbdiff/cli/package.jsondbdiff.pharto thefilesarray so it is included in the published npm package.packages/@dbdiff/cli/bin/dbdiff.jsgetBinaryPath()returnsnull(no native binary installed), fall back to running the bundleddbdiff.pharvia systemphp/php.exe.phpis not in PATH, print a clear actionable error: "Install PHP 8.1+ from https://www.php.net/downloads and add it to your PATH".Result
Windows users (
npm install -g @dbdiff/cli) get a workingdbdiffcommand immediately as long as PHP 8.1+ is in their PATH — which is expected for the PHP developers this tool targets. When native Windows static builds become possible (upstream SPC fix), they will automatically take priority over the fallback with no changes required.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.