-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
I'm using nx-ignore in vercel.
The interesting thing is that it takes 2min30s to build my project but 2min50s to ignore my project.
You can see from the screenshot, it only takes 5s to install nx-ignore, but then nx-ignore used 2min50s to ignore my project.


As a comparison, if I skip this step, it will only take 2min30s to build the whole project.

Here's the code in my vercel-ignore-build.sh
echo $VERCEL_ENV
echo $VERCEL_PROJECT_NAME
echo $VERCEL_GIT_COMMIT_REF
# When git branch is release-<project-name>, it is a release branch
if [[ $VERCEL_GIT_COMMIT_REF == release-* ]]; then
# If release branch name matches project name, deploy this project
if [ $VERCEL_PROJECT_NAME = ${VERCEL_GIT_COMMIT_REF#release-} ]; then
echo "Triggered by push commit on release branch " $VERCEL_GIT_COMMIT_REF " of project " $VERCEL_PROJECT_NAME.
exit 1;
else
echo "Ignore other project's release branch. Skip build for project " $VERCEL_PROJECT_NAME
exit 0;
fi
elif [ $VERCEL_GIT_COMMIT_REF = 'master' ]; then
echo "Triggered by `master` branch push or PR merge"
exit 1;
elif [ $VERCEL_ENV = 'production' ]; then
echo "Triggered by vercel production branch push"
exit 1;
else
echo "compare with master branch in preview"
npx nx-ignore $VERCEL_PROJECT_NAME
fi
victorcarvalhosp, lucaciraolo, andirsun, kevinost and lucasveigafoflynned
Metadata
Metadata
Assignees
Labels
No labels