1.0.5 • Published 5 years ago
is-in-specific-branch v1.0.5
is-in-specific-branch
Simple cli tool to check if you are in a specific branch or not.
npx is-in-specific-branch -b "branch-name"
This module will exit with status 0
if you are now in the given branch, otherwise with status 1
.
Options
Option | Type | Default |
---|---|---|
b | string | master |
Use in Vercel
In Vercel, there is no option to disable preview deployments.
So you can use this module in Vercel Project Settings > Git Integration > Ignored Build Step
to disable all deployments that aren't in Production Branch
.
npx is-in-specific-branch -b "production-branch-name"
Fill COMMAND
with the command above, enter your branch name, and then click Save
.
Any deployments outside the Production Branch
will be automatically canceled.