Skip to content

Commit f47a7c7

Browse files
dackers86mikehardy
andauthored
build: custom vercel script to ignore 'next' branch commits (#5515)
* Added ignore build step for next deployments Note this is connected to Vercel configuration, if this script is removed or altered, the Vercel configuration on their console should be consulted and/or changed Co-authored-by: Mike Hardy <[email protected]>
1 parent 61259ed commit f47a7c7

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

script.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
# As we currently have two deployments of react-native-firebase.
3+
# One is one producetion https://vercel.com/invertase/react-native-firebase
4+
# Another is new modules located at https://vercel.com/invertase/react-native-firebase-next
5+
6+
# This script when combined with the ignore build step command https://vercel.com/invertase/react-native-firebase-next/settings/git
7+
# ensures that only the @invertase/next will cause a build on the new modules deployments.
8+
9+
# This does not affect the main production deployment.
10+
11+
echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF"
12+
13+
if [[ "$VERCEL_GIT_COMMIT_REF" == "@invertase/next" ]] ; then
14+
# Proceed with the build
15+
echo "✅ - Detected this is a build of @invertase/next - build can proceed"
16+
exit 1;
17+
18+
else
19+
# Don't build
20+
echo "🛑 - This is not a build of @invertase/next build cancelled"
21+
exit 0;
22+
fi

0 commit comments

Comments
 (0)