Skip to content

Commit

Permalink
vercel script modified
Browse files Browse the repository at this point in the history
  • Loading branch information
toniskobic committed Aug 31, 2023
1 parent 5324ac8 commit 521d955
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
16 changes: 12 additions & 4 deletions documentation/vercel.script.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#!/bin/bash
if [[ "$VERCEL_GIT_BRANCH" != "main" ]]; then
echo "Branch: $VERCEL_GIT_BRANCH"
echo "Skip building branch $VERCEL_GIT_BRANCH"
exit 1

echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF"

if [[ "$VERCEL_GIT_COMMIT_REF" == "main" ]] ; then
# Proceed with the build
echo "✅ - Build can proceed"
exit 1;

else
# Don't build
echo "🛑 - Build cancelled"
exit 0;
fi
16 changes: 12 additions & 4 deletions vercel.script.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#!/bin/bash
if [[ "$VERCEL_GIT_BRANCH" != "main" ]]; then
echo "Branch: $VERCEL_GIT_BRANCH"
echo "Skip building branch $VERCEL_GIT_BRANCH"
exit 1

echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF"

if [[ "$VERCEL_GIT_COMMIT_REF" == "main" ]] ; then
# Proceed with the build
echo "✅ - Build can proceed"
exit 1;

else
# Don't build
echo "🛑 - Build cancelled"
exit 0;
fi

0 comments on commit 521d955

Please sign in to comment.