diff --git a/.github/workflows/publish-to-aws.yaml b/.github/workflows/publish-to-aws.yaml index 2380745..beb6d00 100644 --- a/.github/workflows/publish-to-aws.yaml +++ b/.github/workflows/publish-to-aws.yaml @@ -66,7 +66,7 @@ jobs: if [ -f "src/atlas/_version.py" ]; then echo "Version file found:" cat src/atlas/_version.py - + # Extract version directly VERSION=$(grep -E '^__version__\s*=' src/atlas/_version.py | grep -o '".*"' | tr -d '"') echo "Direct extraction result: '$VERSION'" @@ -81,7 +81,7 @@ jobs: ls -la ./scripts/get_version.sh VERSION=$(./scripts/get_version.sh 2>&1) echo "Script output: '$VERSION'" - + # Extract just the version (last line) in case there's debug output VERSION=$(echo "$VERSION" | tail -n 1) fi @@ -104,7 +104,7 @@ jobs: - name: Create package directory structure run: | - mkdir -p upload/simple/${{ env.PACKAGE_NAME }} + mkdir -p upload/package/${{ env.PACKAGE_NAME }} mkdir -p upload/versions/${{ steps.get_version.outputs.VERSION }} - name: Copy package files to version-specific folder @@ -170,21 +170,21 @@ jobs: - name: Download existing versions and prepare directories run: | - # Copy current version to simple index - cp dist/* upload/simple/${{ env.PACKAGE_NAME }}/ + # Copy current version to package index + cp dist/* upload/package/${{ env.PACKAGE_NAME }}/ - # Download existing versions from S3 for both simple index and version directories + # Download existing versions from S3 for both package index and version directories while IFS= read -r version; do if [ ! -z "$version" ] && [ "$version" != "${{ steps.get_version.outputs.VERSION }}" ]; then echo "Downloading version $version" - + # Create directory for this version mkdir -p upload/versions/$version - + # Download to both locations: - # 1. To simple index (for pip compatibility) - aws s3 sync s3://${{ secrets.S3_BUCKET_NAME }}/versions/$version/ upload/simple/${{ env.PACKAGE_NAME }}/ || echo "Version $version not found in S3" - + # 1. To package index (for pip compatibility) + aws s3 sync s3://${{ secrets.S3_BUCKET_NAME }}/versions/$version/ upload/package/${{ env.PACKAGE_NAME }}/ || echo "Version $version not found in S3" + # 2. To version-specific directory (for HTML generation) aws s3 sync s3://${{ secrets.S3_BUCKET_NAME }}/versions/$version/ upload/versions/$version/ || echo "Version $version not found in S3" fi @@ -192,7 +192,7 @@ jobs: - name: Generate package index HTML run: | - cat > upload/simple/${{ env.PACKAGE_NAME }}/index.html << EOF + cat > upload/package/${{ env.PACKAGE_NAME }}/index.html << EOF
@@ -203,14 +203,14 @@ jobs: EOF - for file in upload/simple/${{ env.PACKAGE_NAME }}/*.{tar.gz,whl}; do + for file in upload/package/${{ env.PACKAGE_NAME }}/*.{tar.gz,whl}; do if [ -f "$file" ]; then filename=$(basename "$file") - echo " $filename