Update build scripts, moved cleanup to .yml

This commit is contained in:
JaxxMoss 2025-05-09 01:05:58 +02:00
parent 05fdaa3d3a
commit 2760a80879
2 changed files with 18 additions and 28 deletions

View file

@ -32,11 +32,24 @@ jobs:
shell: cmd
run: .\build-scripts\windows-build.bat
- name: Cleanup build-scripts directory
shell: bash
- name: Cleanup root directory
shell: pwsh
run: |
echo "Removing build-scripts directory..."
rmdir /s /q build-scripts
$folders = @("app", "ui", "build-scripts")
foreach ($folder in $folders) {
if (Test-Path $folder) {
Remove-Item -Recurse -Force -Path $folder
Write-Output "Removed development folder: $folder"
} else {
Write-Output "$folder does not exist"
}
}
# Delete all files except: Macrame.exe, favicon.ico, README.md
Get-ChildItem -File | Where-Object { $_.Name -notin @("Macrame.exe", "favicon.ico", "README.md") } | ForEach-Object {
Write-Output "Deleting file: $($_.Name)"
Remove-Item -Force $_.FullName
}
- name: Commit and push build artifacts
shell: bash

View file

@ -31,27 +31,4 @@ IF %ERRORLEVEL% NEQ 0 (
exit /b %ERRORLEVEL%
)
cd ..
REM Step 3: Cleanup root directory of build files.
echo Cleaning up root directory...
IF EXIST app (
echo Deleting app directory...
rmdir /s /q app
)
IF EXIST ui (
echo Deleting ui directory...
rmdir /s /q ui
)
for %%F in (*) do (
set "file=%%~nxF"
if /I not "!file!"=="Macrame.exe" if /I not "!file!"=="favicon.ico" if /I not "!file!"=="README.md" (
echo Deleting !file!
del /f /q "%%F"
)
)
echo Build and cleanup complete.
echo Build complete.