Add debugging and fix absolute paths in version consistency check

Added comprehensive debugging to diagnose why get_pyproject_version.py
is not receiving arguments correctly after git reset.

Changes:
- Added debug output showing current directory, GITHUB_WORKSPACE, and paths
- Changed pyproject.toml path to use absolute path with GITHUB_WORKSPACE
- Added ls commands to verify files exist before running script
- This will help identify if the git reset is affecting path resolution

The error shows the script's usage message, indicating arguments
aren't being passed correctly. The debug output will reveal why.

Related: https://github.com/trycua/cua/actions/runs/19482970320

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
f-trycua
2025-11-18 23:51:26 +01:00
parent dbd5a76f82
commit a08363f46e

View File

@@ -84,9 +84,21 @@ jobs:
# Install toml parser
pip install toml
# Debug: Show current directory and paths
echo "Current directory: $(pwd)"
echo "GITHUB_WORKSPACE: ${GITHUB_WORKSPACE}"
echo "Package dir: ${{ inputs.package_dir }}"
echo "Expected version: ${{ inputs.version }}"
echo "Script path: ${GITHUB_WORKSPACE}/.github/scripts/get_pyproject_version.py"
echo "Pyproject path: ${GITHUB_WORKSPACE}/${{ inputs.package_dir }}/pyproject.toml"
# Check if files exist
ls -la ${GITHUB_WORKSPACE}/.github/scripts/get_pyproject_version.py
ls -la ${GITHUB_WORKSPACE}/${{ inputs.package_dir }}/pyproject.toml
# Verify version matches using script (exits with error if mismatch)
python ${GITHUB_WORKSPACE}/.github/scripts/get_pyproject_version.py \
${{ inputs.package_dir }}/pyproject.toml \
${GITHUB_WORKSPACE}/${{ inputs.package_dir }}/pyproject.toml \
${{ inputs.version }}
- name: Initialize PDM in package directory