-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathupdate.bat
More file actions
51 lines (44 loc) · 1.09 KB
/
update.bat
File metadata and controls
51 lines (44 loc) · 1.09 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
@echo off
setlocal
REM Get the directory where this script is located
set "SCRIPT_DIR=%~dp0"
cd /d "%SCRIPT_DIR%"
title Updating VisionCaptioner...
echo.
echo ------------------------------------------
echo UPDATING VISION CAPTIONER
echo ------------------------------------------
echo.
echo [1/3] Pulling latest changes from git...
git pull
if errorlevel 1 (
echo.
echo WARNING: git pull failed. Continuing anyway...
echo.
)
echo.
echo [2/3] Activating environment...
if not exist "venv\Scripts\activate.bat" (
echo ERROR: venv not found at %SCRIPT_DIR%venv
echo Please create the virtual environment first.
pause
exit /b 1
)
call "venv\Scripts\activate.bat"
echo.
echo [3/3] Upgrading pip packages from requirements.txt...
python -m pip install --upgrade pip
python -m pip install --upgrade -r requirements.txt
if errorlevel 1 (
echo.
echo ERROR: pip install failed. See messages above.
pause
exit /b 1
)
echo.
echo ------------------------------------------
echo UPDATE COMPLETE
echo ------------------------------------------
echo.
pause
endlocal