/
DATKAI
/
label_system
Обзор
Документация
Войти
/
DATKAI
/
label_system
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
setup_git.bat
50 строк
1 KB
DATKAI
setup_git.bat — превращает скопированную папку в git-клон (для авто-обновлений)
30 июн 2026, 12:24
30 июн 2026, 12:24
d3ac410
Код
Авторство
О чём код?
@echo off chcp 65001 >nul title Setup Git (auto-update) cd /d "%~dp0" echo. echo ============================================================ echo Connect THIS folder to GitVerse to enable auto-updates. echo ============================================================ echo. echo - Your data (label.db, db.json*) will NOT be touched. echo - STOP the server first (close the server window). echo - Git for Windows must be installed (with PATH option). echo. echo Press any key to continue, or close this window to cancel. pause >nul echo. git --version if errorlevel 1 ( echo. echo ERROR: Git is not installed or not in PATH. echo Install "Git for Windows" and choose the option to add Git to PATH. echo. pause exit /b 1 ) set GIT_TERMINAL_PROMPT=0 if not exist ".git" git init git remote remove origin 2>nul git remote add origin https://gitverse.ru/DATKAI/label_system.git echo. echo Fetching from GitVerse... git fetch origin if errorlevel 1 ( echo. echo Fetch FAILED. The repo may be PRIVATE. echo Tell the developer - a read-only deploy key is needed on this server. echo. pause exit /b 1 ) git reset --hard origin/main git checkout -B main git branch --set-upstream-to=origin/main main 2>nul echo. echo ============================================================ echo DONE. This folder is now a git clone. echo Start the server (start.bat) - the update panel will work. echo ============================================================ echo. pause