Files
medusa-store/www/ignore-build-script.sh
Shahed Nasser 0c9d5ea6d4 docs: update contribution guideline (#5188)
* fix ignore command

* fixed ignore script

* docs: update contribution guideline

* fix ignore script

* fix eslint errors

* remove exit option
2023-09-22 16:08:11 +03:00

19 lines
446 B
Bash

#!/bin/bash
echo "VERCEL_ENV: $VERCEL_ENV"
echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF"
$(git diff HEAD^ HEAD --quiet .)
diffResult=$?
echo "DIFF RESULT: $diffResult"
if [[ ("$VERCEL_ENV" == "production" && $diffResult -eq 1) || "$VERCEL_GIT_COMMIT_REF" = "docs/"* ]] ; then
# Proceed with the build
echo "✅ - Build can proceed"
exit 1;
else
# Don't build
echo "🛑 - Build cancelled: Conditions don't match"
exit 0;
fi