96 lines
2.4 KiB
Batchfile
96 lines
2.4 KiB
Batchfile
@echo off
|
|
setlocal enabledelayedexpansion
|
|
|
|
echo === Test Windows Fix ===
|
|
echo.
|
|
|
|
REM Clean up previous test files
|
|
echo [CLEANUP] Removing previous test files...
|
|
for /d %%d in (dms-compliance-*) do (
|
|
if exist "%%d" rmdir /s /q "%%d" 2>nul
|
|
)
|
|
for %%f in (*.zip) do (
|
|
if exist "%%f" del "%%f" 2>nul
|
|
)
|
|
|
|
echo.
|
|
|
|
REM Test the fixed script
|
|
echo [TEST] Testing fixed Windows script...
|
|
echo.
|
|
echo Simulating user input:
|
|
echo 1 - Dual Service Architecture
|
|
echo 0 - Auto-detect platform
|
|
echo y - Confirm build
|
|
echo.
|
|
|
|
(
|
|
echo 1
|
|
echo 0
|
|
echo y
|
|
) | create-compose-package-windows-en.bat
|
|
|
|
echo.
|
|
echo === Test Results ===
|
|
|
|
REM Check if any files were generated
|
|
set "FOUND_FILES=0"
|
|
|
|
echo [CHECK] Looking for generated files...
|
|
|
|
REM Check for zip files
|
|
for %%f in (*.zip) do (
|
|
if exist "%%f" (
|
|
echo [SUCCESS] Found archive: %%f
|
|
for %%A in ("%%f") do echo [INFO] File size: %%~zA bytes
|
|
set "FOUND_FILES=1"
|
|
|
|
REM Try to extract and check contents
|
|
echo [INFO] Extracting archive...
|
|
powershell -command "try { Expand-Archive -Path '%%f' -DestinationPath '.' -Force; Write-Host '[SUCCESS] Archive extracted successfully' } catch { Write-Host '[ERROR] Failed to extract archive' }"
|
|
)
|
|
)
|
|
|
|
REM Check for directories
|
|
for /d %%d in (dms-compliance-*) do (
|
|
if exist "%%d" (
|
|
echo [SUCCESS] Found directory: %%d
|
|
echo [INFO] Directory contents:
|
|
dir "%%d" /b 2>nul
|
|
set "FOUND_FILES=1"
|
|
|
|
REM Check key files
|
|
echo [CHECK] Verifying key files:
|
|
if exist "%%d\docker-compose.yml" (
|
|
echo [SUCCESS] docker-compose.yml found
|
|
echo [INFO] First 10 lines of docker-compose.yml:
|
|
powershell -command "Get-Content '%%d\docker-compose.yml' | Select-Object -First 10"
|
|
) else (
|
|
echo [ERROR] docker-compose.yml missing
|
|
)
|
|
|
|
if exist "%%d\Dockerfile" (
|
|
echo [SUCCESS] Dockerfile found
|
|
) else (
|
|
echo [ERROR] Dockerfile missing
|
|
)
|
|
|
|
if exist "%%d\start.bat" (
|
|
echo [SUCCESS] start.bat found
|
|
) else (
|
|
echo [ERROR] start.bat missing
|
|
)
|
|
)
|
|
)
|
|
|
|
if "%FOUND_FILES%"=="0" (
|
|
echo [ERROR] No output files found
|
|
echo [INFO] The script may have failed during execution
|
|
) else (
|
|
echo [SUCCESS] Test completed successfully!
|
|
)
|
|
|
|
echo.
|
|
echo Test finished!
|
|
pause
|