mirror of
https://github.com/DBDiff/DBDiff.git
synced 2026-04-25 05:15:49 +03:00
[PR #143] [MERGED] Multi-Platform Binary Distributions (Windows, Mac, Linux, npm) & Box PHAR Builds #278
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#278
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/143
Author: @jasdeepkhalsa
Created: 3/6/2026
Status: ✅ Merged
Merged: 3/7/2026
Merged by: @jasdeepkhalsa
Base:
master← Head:feature/dbdiff-multi-platform-binaries📝 Commits (3)
70a4f6cfeat: multi-platform binary distribution via npm + GitHub Actionsa99fe01feat: Docker registry publishing, unified config, PHP 8.1 floor, README overhaulda55fe8chore: drop Docker Hub, publish to GHCR only📊 Changes
27 files changed (+4615 additions, -577 deletions)
View changed files
📝
.dockerignore(+2 -0)📝
.github/workflows/release.yml(+470 -42)📝
.github/workflows/tests.yml(+1 -1)📝
.gitignore(+8 -0)📝
README.md(+325 -284)➕
box.json(+20 -0)📝
composer.json(+5 -4)📝
composer.lock(+2785 -167)📝
dbdiff.yml.example(+33 -26)➕
docker/Dockerfile.slim(+49 -0)➕
packages/@dbdiff/cli-darwin-arm64/package.json(+17 -0)➕
packages/@dbdiff/cli-darwin-x64/package.json(+17 -0)➕
packages/@dbdiff/cli-linux-arm64-musl/package.json(+18 -0)➕
packages/@dbdiff/cli-linux-arm64/package.json(+18 -0)➕
packages/@dbdiff/cli-linux-x64-musl/package.json(+18 -0)➕
packages/@dbdiff/cli-linux-x64/package.json(+18 -0)➕
packages/@dbdiff/cli-win32-arm64/package.json(+17 -0)➕
packages/@dbdiff/cli-win32-x64/package.json(+17 -0)➕
packages/@dbdiff/cli/README.md(+59 -0)➕
packages/@dbdiff/cli/bin/dbdiff.js(+97 -0)...and 7 more files
📄 Description
feat: Multi-platform binary distribution + GHCR registry publishing + v3.0.0 prep
Overview
This PR ships DBDiff as a proper multi-platform CLI tool — pre-built self-contained binaries for 8 platforms, npm packages, GHCR registry images, a Homebrew formula updater, and a unified config file. It also raises the PHP floor to 8.1 and completely rewrites the README.
Distribution — new installation methods
Pre-built binaries (zero dependencies)
PHAR builds now with Box and static self-contained executables built with static-php-cli — PHP 8.3 micro SAPI + PHAR stitched together. No PHP, Composer, or Node required.
dbdiff-linux-x64dbdiff-linux-x64-musldbdiff-linux-arm64dbdiff-linux-arm64-musldbdiff-darwin-x64dbdiff-darwin-arm64dbdiff-win32-x64.exedbdiff-win32-arm64.exenpm —
@dbdiff/climeta-package with 8 optional platform packages. Installs the correct binary automatically.Docker — new
docker/Dockerfile.slim(PHP 8.3 Alpine + PHAR, ~119 MB). Published to GHCR on every release — no secrets required beyond the defaultGITHUB_TOKEN.GitHub Actions
release.yml— new complete release pipeline triggered onv*tag push:build-phar— compilesdist/dbdiff.pharvia Box, uploads as artifactbuild-binary— matrix across 8 platform targets; SPC downloads sources, buildsmicro.sfx, stitches with PHARpublish— creates GitHub Release, uploads all binaries + PHAR, publishes npm packagespublish-docker— pushes slim + full images to GHCR; login and push steps havecontinue-on-error: truewith anif: always()summary step showing ✅/⏭️/❌; multi-arch build (linux/amd64+linux/arm64) via QEMU + buildx; GHA layer cachingtests.yml— PHP matrix minimum bumped8.0→8.1PHP 8.0 dropped — minimum now 8.1
composer.json:require.phpandconfig.platform.phpbumped from8.0to8.1composer.lock: regenerated content-hash for 8.1 platform overridehumbug/boxbuild-time conflict that was failing CIUnified config file (
dbdiff.yml)Previously the diff tool only looked for
.dbdiffand the migration runner only looked fordbdiff.yml. NowFSGetter.phpwalks a fallback chain so one file drives both modes:.dbdiff→dbdiff.yml→.dbdiff.yml→dbdiff.yamldbdiff.yml.examplerestructured: diff section (server1/server2/driver/type) is first-class and uncommented; migrationdatabasesection follows. Fully backwards-compatible — existing.dbdifffiles continue to work.New scripts
scripts/release-binaries.shscripts/test-release-podman.shscripts/update-homebrew-formula.shscripts/release.shbox.jsonREADME
Complete rewrite:
dbdiff.ymlFile Examples — single file covers both diff and migration modes, with config priority tablePre-merge checklist
build-phartested locally (box compileviaphp:8.3-cli-alpine→ passes)--versionreturnsDBDiff 2.0.0)docker/Dockerfile.slimbuilt locally (119 MB,--versionand--helppass)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.