From de3c282825cb698fe007886cdfbd9620d100f525 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Thu, 15 Jan 2026 09:07:23 -0600 Subject: [PATCH] Fix debug info display - show after clear command - Moved debug fields (Local HEAD, Created, Commit) into monitoring loop - Removed duplicate output that was immediately cleared - Added warning when local commit doesn't match pipeline commit - Now debug info stays visible throughout monitoring --- scripts/monitor-deploy.sh | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/scripts/monitor-deploy.sh b/scripts/monitor-deploy.sh index f11035e9..e95c12e9 100755 --- a/scripts/monitor-deploy.sh +++ b/scripts/monitor-deploy.sh @@ -194,13 +194,6 @@ monitor_pipeline() { local branch=$(get_current_branch) local local_sha=$(git rev-parse HEAD 2>/dev/null | cut -c1-8) - echo -e "${BLUE}Branch:${NC} $branch" - if [ -n "$local_sha" ]; then - echo -e "${BLUE}Local HEAD:${NC} $local_sha" - fi - echo -e "${BLUE}Fetching latest pipeline...${NC}" - echo "" - local pipeline=$(get_latest_pipeline "$branch") if [ -z "$pipeline" ] || [ "$pipeline" = "null" ]; then @@ -215,13 +208,6 @@ monitor_pipeline() { local pipeline_sha=$(echo "$pipeline" | jq -r '.sha') local pipeline_created=$(echo "$pipeline" | jq -r '.created_at') - echo -e "${BLUE}Pipeline:${NC} #$pipeline_id" - echo -e "${BLUE}Created:${NC} $pipeline_created" - echo -e "${BLUE}Commit:${NC} ${pipeline_sha:0:8}" - echo -e "${BLUE}Status:${NC} $(status_icon $pipeline_status) $pipeline_status" - echo -e "${BLUE}URL:${NC} $pipeline_web_url" - echo "" - local start_time=$(date +%s) # Monitor until complete @@ -229,8 +215,18 @@ monitor_pipeline() { print_header echo -e "${BLUE}Branch:${NC} $branch" + echo -e "${BLUE}Local HEAD:${NC} $local_sha" echo -e "${BLUE}Pipeline:${NC} #$pipeline_id" + echo -e "${BLUE}Created:${NC} $pipeline_created" + echo -e "${BLUE}Commit:${NC} ${pipeline_sha:0:8}" + + # Warn if local commit doesn't match pipeline commit + if [ "$local_sha" != "${pipeline_sha:0:8}" ]; then + echo -e "${YELLOW}⚠️ Warning: Pipeline is for a different commit${NC}" + fi + echo -e "${BLUE}Status:${NC} $(status_icon $pipeline_status) $pipeline_status" + echo -e "${BLUE}URL:${NC} $pipeline_web_url" echo "" # Get and display jobs