Docs / Safety checks and Sync main
Safety checks and Sync main
The ways laptop releases usually go wrong, how ReleaseKey checks for them before every deploy or migration, and the one-click fix.
Most deploy CLIs, like supabase functions deploy and trigger.dev deploy, ship your local checkout, not what’s merged on GitHub. That makes the state of your working copy part of every release.
The four checks
Before a deploy or migration step runs, ReleaseKey checks:
| Check | Why it matters |
|---|---|
| On a feature branch | A step run from a feature branch can deploy unmerged code. |
| Uncommitted changes | Those files get deployed too. |
Behind origin/main |
You’d ship stale code. Pull first. |
| Local commits not pushed | Production would run code that isn’t on GitHub. |
If any apply, you get a confirmation dialog with the details. You can cancel, run anyway, or, when it fixes the problem, choose Sync main, then run.
Sync main
One click runs this in the card’s terminal:
git switch main && git pull --ff-only
A Sync main pill appears on the card whenever you’re on another branch or behind origin/main.
--ff-only means it never creates merge commits or rewrites history. If something is in the way, like uncommitted changes on your branch, it stops and shows you why. Usually that’s an agent’s or your own work in progress: commit it on its branch or stash it first.
Confirm before running
Mark any step as confirm and ReleaseKey asks before it runs, even when every check passes. Use it for anything that changes production.
Something unclear or out of date? Email hello@releasekey.dev.