From fc7c99eeabc97a6dd8f7f2659a1c9ccb9225b990 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com.> Date: Thu, 17 Jul 2025 12:58:46 +0100 Subject: [PATCH] debug --- .github/workflows/PR-Auto-Deploy-V2.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/PR-Auto-Deploy-V2.yml b/.github/workflows/PR-Auto-Deploy-V2.yml index 144fb04bd..546fe30d6 100644 --- a/.github/workflows/PR-Auto-Deploy-V2.yml +++ b/.github/workflows/PR-Auto-Deploy-V2.yml @@ -204,20 +204,36 @@ jobs: - name: Get commit hashes for frontend and backend id: commit-hashes run: | + # Debug: Show current git state + echo "Current branch: $(git branch --show-current)" + echo "Recent commits:" + git log --oneline -5 + # Get last commit that touched the frontend folder specifically + echo "Checking frontend commits..." FRONTEND_HASH=$(git log -1 --format="%H" -- frontend/ 2>/dev/null || echo "") + echo "Frontend hash result: '$FRONTEND_HASH'" + if [ -z "$FRONTEND_HASH" ]; then - # If no commits found for frontend, use a default hash + echo "No frontend commits found, using fallback" FRONTEND_HASH="no-frontend-changes" fi - echo "frontend_hash=$FRONTEND_HASH" >> $GITHUB_OUTPUT # Get last commit that touched files outside frontend folder (backend changes) + echo "Checking backend commits..." BACKEND_HASH=$(git log -1 --format="%H" -- . ':!frontend/' 2>/dev/null || echo "") + echo "Backend hash result: '$BACKEND_HASH'" + if [ -z "$BACKEND_HASH" ]; then - # If no commits found for backend, use a default hash + echo "No backend commits found, using fallback" BACKEND_HASH="no-backend-changes" fi + + # Output full hashes for debugging + echo "Final frontend hash: $FRONTEND_HASH" + echo "Final backend hash: $BACKEND_HASH" + + echo "frontend_hash=$FRONTEND_HASH" >> $GITHUB_OUTPUT echo "backend_hash=$BACKEND_HASH" >> $GITHUB_OUTPUT # Short hashes for tags (handle special cases)