mirror of
https://github.com/yeongpin/cursor-free-vip.git
synced 2025-04-24 08:25:23 +00:00
Enhance GitHub Actions workflow to include checks for the existence of output files before renaming them in the ARM64 Docker build process. This ensures proper handling of file naming and provides error feedback if expected files are not found.
This commit is contained in:
parent
615c3ea2db
commit
b571356fbf
15
.github/workflows/build.yml
vendored
15
.github/workflows/build.yml
vendored
@ -195,13 +195,24 @@ jobs:
|
||||
|
||||
- name: Build in ARM64 Docker container
|
||||
run: |
|
||||
docker run --rm --platform linux/arm64 -v ${{ github.workspace }}:/app -w /app arm64v8/python:3.10-slim bash -c "
|
||||
docker run --rm --platform linux/arm64 -v ${{ github.workspace }}:/app -w /app -e VERSION=${{ env.VERSION }} arm64v8/python:3.10-slim bash -c "
|
||||
apt-get update && apt-get install -y build-essential
|
||||
pip install --upgrade pip
|
||||
pip install pyinstaller
|
||||
pip install -r requirements.txt
|
||||
python -m PyInstaller build.spec
|
||||
mv /app/dist/CursorFreeVIP_${{ env.VERSION }}_linux /app/dist/CursorFreeVIP_${{ env.VERSION }}_linux_arm64
|
||||
# 检查生成的文件名
|
||||
ls -la /app/dist/
|
||||
# 使用正确的文件名进行移动
|
||||
if [ -f \"/app/dist/CursorFreeVIP_\${VERSION}_linux\" ]; then
|
||||
mv \"/app/dist/CursorFreeVIP_\${VERSION}_linux\" \"/app/dist/CursorFreeVIP_\${VERSION}_linux_arm64\"
|
||||
elif [ -f \"/app/dist/CursorFreeVIP_linux\" ]; then
|
||||
mv \"/app/dist/CursorFreeVIP_linux\" \"/app/dist/CursorFreeVIP_\${VERSION}_linux_arm64\"
|
||||
else
|
||||
echo \"Error: Cannot find expected output file in dist directory\"
|
||||
ls -la /app/dist/
|
||||
exit 1
|
||||
fi
|
||||
"
|
||||
echo "Contents of dist directory:"
|
||||
ls -la dist/
|
||||
|
Loading…
x
Reference in New Issue
Block a user