-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathupdate_and_run.bat
More file actions
39 lines (35 loc) · 838 Bytes
/
update_and_run.bat
File metadata and controls
39 lines (35 loc) · 838 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
@echo off
echo ==========================================
echo Gemini-Web2API Update and Run
echo ==========================================
echo.
:: 1. Pull latest code
echo Pulling latest code from remote...
git pull
if %errorlevel% neq 0 (
echo Git pull failed!
pause
exit /b
)
echo Pull successful!
echo.
:: 2. Build the executable
echo Building latest version...
go build -ldflags="-s -w" -o Gemini-Web2API.exe cmd/server/main.go
if %errorlevel% neq 0 (
echo Build failed! Please check your Go installation.
pause
exit /b
)
echo Build successful!
echo.
:: 3. Run the executable
echo Starting server...
echo It will automatically attempt to load cookies from your browser (Firefox/Chrome/Edge).
echo.
Gemini-Web2API.exe
if %errorlevel% neq 0 (
echo.
echo Server exited with error.
pause
)