@@ -32,14 +32,17 @@ jobs:
3232 - name : Build executable with PyInstaller
3333 run : |
3434 cd backend
35- pyinstaller main.py --name PictoPy_Server --onedir --distpath dist
35+ pyinstaller PictoPy.spec
3636
37- - name : Copy app folder
37+ - name : Verify no .onnx artifacts
38+ shell : pwsh
3839 run : |
39- cd backend
40- mkdir dist/PictoPy_Server/images
41- robocopy app dist\PictoPy_Server\app /e
42- if ($LASTEXITCODE -le 1) { exit 0 }
40+ $onnxFiles = Get-ChildItem -Path "backend/dist/PictoPy_Server" -Recurse -Filter "*.onnx" -File
41+ if ($onnxFiles) {
42+ Write-Error "Found bundled .onnx artifacts in backend/dist/PictoPy_Server:"
43+ $onnxFiles | ForEach-Object { Write-Error $_.FullName }
44+ exit 1
45+ }
4346
4447 - name : Create ZIP package
4548 run : |
@@ -74,14 +77,17 @@ jobs:
7477 - name : Build executable with PyInstaller
7578 run : |
7679 cd backend
77- pyinstaller main.py --name PictoPy_Server --onedir --distpath dist
80+ pyinstaller PictoPy.spec
7881
79- - name : Copy app folder
82+ - name : Verify no .onnx artifacts
83+ shell : bash
8084 run : |
81- cd backend
82- mkdir -p dist/PictoPy_Server/images
83- mkdir -p dist/PictoPy_Server/app
84- cp -r app/* dist/PictoPy_Server/app/
85+ onnx_files=$(find backend/dist/PictoPy_Server -type f -name "*.onnx")
86+ if [ -n "$onnx_files" ]; then
87+ echo "Found bundled .onnx artifacts in backend/dist/PictoPy_Server:"
88+ echo "$onnx_files"
89+ exit 1
90+ fi
8591
8692 - name : Create ZIP package
8793 run : |
@@ -114,14 +120,17 @@ jobs:
114120 - name : Build executable with PyInstaller
115121 run : |
116122 cd backend
117- pyinstaller main.py --name PictoPy_Server --onedir --distpath dist
123+ pyinstaller PictoPy.spec
118124
119- - name : Copy app folder
125+ - name : Verify no .onnx artifacts
126+ shell : bash
120127 run : |
121- cd backend
122- mkdir -p dist/PictoPy_Server/images
123- mkdir -p dist/PictoPy_Server/app
124- cp -r app/* dist/PictoPy_Server/app/
128+ onnx_files=$(find backend/dist/PictoPy_Server -type f -name "*.onnx")
129+ if [ -n "$onnx_files" ]; then
130+ echo "Found bundled .onnx artifacts in backend/dist/PictoPy_Server:"
131+ echo "$onnx_files"
132+ exit 1
133+ fi
125134
126135 - name : Create ZIP package
127136 run : |
0 commit comments