-
Notifications
You must be signed in to change notification settings - Fork 193
Expand file tree
/
Copy pathmake_release.cmd
More file actions
49 lines (42 loc) · 866 Bytes
/
Copy pathmake_release.cmd
File metadata and controls
49 lines (42 loc) · 866 Bytes
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
@echo off
setlocal EnableExtensions EnableDelayedExpansion
set VERSION=v3.0.0
set ARCHIVE_NAME=local_ai_ocr-%VERSION%.zip
set ZIP=7z.exe
where %ZIP% >nul 2>&1
if errorlevel 1 (
echo FATAL: 7z.exe not found in PATH
exit /b 1
)
if exist "%ARCHIVE_NAME%" (
echo Removing existing archive: %ARCHIVE_NAME%
del /f /q "%ARCHIVE_NAME%"
)
echo Creating %ARCHIVE_NAME%...
%ZIP% a -tzip "%ARCHIVE_NAME%" ^
"demo\" ^
"src\" ^
".gitignore" ^
"env_setup.cmd" ^
"LICENSE" ^
"README.md" ^
"README_dev.md" ^
"README_en.md" ^
"requirements.txt" ^
"run.cmd" ^
"run_cpu-only.cmd" ^
-xr^^!"__pycache__" ^
-xr^^!"*.pyc" ^
-xr^^!"*.pyo"
if errorlevel 1 (
echo.
echo FATAL: make_release failed
echo.
pause
exit /b 1
)
echo.
echo DONE: %ARCHIVE_NAME% created successfully
echo.
endlocal
pause