-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
76 lines (64 loc) · 1.83 KB
/
Copy pathbuild.bat
File metadata and controls
76 lines (64 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
@echo off
REM Build script for PromptBoard v1.1.1
REM ===================================
REM Builds a single-file Windows executable via PyInstaller,
REM copies artefacts into releases\v1.1.1\, generates SHA256SUMS.txt.
setlocal enabledelayedexpansion
cd /d "%~dp0"
set VERSION=1.1.1
set RELEASE_DIR=releases\v%VERSION%
echo.
echo === PromptBoard Build v%VERSION% ===
echo.
python --version >nul 2>&1
if errorlevel 1 (
echo [FEHLER] Python nicht gefunden!
pause
exit /b 1
)
REM Ensure PyInstaller is available
python -c "import PyInstaller" >nul 2>&1
if errorlevel 1 (
echo [INFO] PyInstaller fehlt, installiere requirements-dev.txt...
python -m pip install -r requirements-dev.txt
if errorlevel 1 (
echo [FEHLER] PyInstaller-Installation fehlgeschlagen.
pause
exit /b 1
)
)
echo.
echo --- Clean build/dist ---
if exist build rmdir /S /Q build
if exist dist rmdir /S /Q dist
if not exist "%RELEASE_DIR%" mkdir "%RELEASE_DIR%"
echo.
echo --- PyInstaller ---
python -m PyInstaller pyinstaller.spec --noconfirm
if errorlevel 1 (
echo [FEHLER] Build fehlgeschlagen.
pause
exit /b 1
)
echo.
echo --- Stage release artefacts ---
copy /Y "dist\PromptBoard-1.1.1-win64.exe" "%RELEASE_DIR%\" >nul
echo --- Source archive ---
python -c "import shutil; shutil.make_archive(r'%RELEASE_DIR%\PromptBoard-1.1.1-source', 'zip', '.', 'src')"
echo --- CHANGELOG ---
copy /Y "CHANGELOG.md" "%RELEASE_DIR%\CHANGELOG.txt" >nul
echo --- SHA256SUMS ---
pushd "%RELEASE_DIR%"
if exist SHA256SUMS.txt del SHA256SUMS.txt
for %%F in (*.exe *.zip) do (
for /f "delims=" %%H in ('certutil -hashfile "%%F" SHA256 ^| findstr /R "^[0-9a-f][0-9a-f]"') do (
echo %%H %%F>> SHA256SUMS.txt
)
)
popd
echo.
echo === BUILD ERFOLGREICH ===
echo Release-Artefakte in %RELEASE_DIR%\
dir "%RELEASE_DIR%"
echo.
endlocal