mirror of
https://github.com/Macrame-App/Macrame
synced 2025-12-29 07:19:26 +00:00
Update build scripts, moved cleanup to .yml
This commit is contained in:
parent
05fdaa3d3a
commit
2760a80879
2 changed files with 18 additions and 28 deletions
21
.github/workflows/windows-release.yml
vendored
21
.github/workflows/windows-release.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue