open-nomad/website/scripts/should-build.sh
Tim Gross 4078e6ea0e
scripts: fix interpreter for bash (#12549)
Many of our scripts have a non-portable interpreter line for bash and
use bash-specific variables like `BASH_SOURCE`. Update the interpreter
line to be portable between various Linuxes and macOS without
complaint from posix shell users.
2022-04-12 10:08:21 -04:00

14 lines
452 B
Bash

#!/usr/bin/env bash
# This is run during the website build step to determine if we should skip the build or not.
# More information: https://vercel.com/docs/platform/projects#ignored-build-step
if [[ "$VERCEL_GIT_COMMIT_REF" == "stable-website" ]] ; then
# Proceed with the build if the branch is stable-website
echo "✅ - Build can proceed"
exit 1;
else
# Check for differences in the website directory
git diff --quiet HEAD^ HEAD ./
fi