Skip to content

Commit

Permalink
fix(scripts): debug deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
webspaceadam committed Nov 15, 2023
1 parent a4b98a2 commit 823a3cb
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion apps/swirl-docs/deploy-script.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# Print the current environment variables for debugging
echo "Current Environment Variables:"
printenv

# Check if DEPLOY_HOOK_TRIGGERED environment variable is set
echo "Checking if DEPLOY_HOOK_TRIGGERED is set..."
if [ -z "$DEPLOY_HOOK_TRIGGERED" ]; then
ls && git diff HEAD^ HEAD --quiet ./src
echo "DEPLOY_HOOK_TRIGGERED is not set. Checking for changes in ./src..."
# List current directory and check for changes
ls
git diff HEAD^ HEAD --quiet ./src
# Capture the exit status of git diff
GIT_DIFF_EXIT_STATUS=$?
echo "Git diff exit status: $GIT_DIFF_EXIT_STATUS"
# Exit with the git diff exit status
exit $GIT_DIFF_EXIT_STATUS
else
# Bypass ignore build step
echo "Deploy hook triggered, proceeding with build"
Expand Down

0 comments on commit 823a3cb

Please sign in to comment.