From c6169607aeb9ffa110803b6d285e75fd1ab8d5fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20L=C3=B3pez?= Date: Thu, 24 Feb 2022 12:17:49 -0700 Subject: [PATCH] Adds script to regulate staging deploys (#1979) --- scripts/staging-deploy.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 scripts/staging-deploy.sh diff --git a/scripts/staging-deploy.sh b/scripts/staging-deploy.sh new file mode 100755 index 0000000000..2c86b46f58 --- /dev/null +++ b/scripts/staging-deploy.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF" + +if [[ "$VERCEL_GIT_COMMIT_REF" == "staging" ]] ; then + # Proceed with the build + echo "✅ - Build can proceed" + ./vercel.sh + exit 1; + +else + # Don't build + echo "🛑 - Build cancelled" + exit 0; +fi