|
@@ -1,25 +1,5 @@
|
|
|
@echo off
|
|
|
|
|
|
-REM Function to check if a repository exists and perform git pull or git clone
|
|
|
-:update_repository
|
|
|
-setlocal
|
|
|
-set "repo_url=%~1"
|
|
|
-set "repo_dir=%~2"
|
|
|
-set "repo_branch=%~3"
|
|
|
-
|
|
|
-if exist "%repo_dir%" (
|
|
|
- rem If the directory exists, then do a git pull
|
|
|
- echo Updating %repo_dir%...
|
|
|
- cd "%repo_dir%" || exit /b
|
|
|
- git pull
|
|
|
- cd ..
|
|
|
-) else (
|
|
|
- rem If the directory does not exist, then do a git clone
|
|
|
- echo Cloning %repo_url% into %repo_dir%...
|
|
|
- git clone -b %repo_branch% %repo_url% %repo_dir%
|
|
|
-)
|
|
|
-endlocal
|
|
|
-
|
|
|
REM Update repositories
|
|
|
call :update_repository "https://git.sharix-app.org/ShariX_Open/sharix-open-tickets.git" "tickets" "master"
|
|
|
call :update_repository "https://git.sharix-app.org/ShariX_Open/sharix-open-backend.git" "metaservicesynced" "metasynced_module"
|
|
@@ -31,11 +11,11 @@ git pull
|
|
|
|
|
|
REM Create a Python virtual environment and activate it
|
|
|
python -m venv venv
|
|
|
-.\venv\Scripts\activate
|
|
|
+call venv\Scripts\activate
|
|
|
|
|
|
REM Upgrade pip and install requirements
|
|
|
-pip install --upgrade pip
|
|
|
-pip install -r requirements.txt
|
|
|
+python -m pip install --upgrade pip
|
|
|
+python -m pip install -r requirements.txt
|
|
|
|
|
|
REM Checking for core/settings_vars.py
|
|
|
if exist core\settings_vars.py (
|
|
@@ -46,6 +26,29 @@ if exist core\settings_vars.py (
|
|
|
)
|
|
|
|
|
|
REM Run Django migrations and other commands
|
|
|
-python manage.py makemigrations SharixAdmin metaservicesynced tickets webservice_running landing
|
|
|
-python manage.py migrate
|
|
|
-python manage.py collectstatic --clear --no-input
|
|
|
+python -m manage.py makemigrations SharixAdmin metaservicesynced tickets webservice_running landing
|
|
|
+python -m manage.py migrate
|
|
|
+python -m manage.py collectstatic --clear --no-input
|
|
|
+
|
|
|
+goto :eof
|
|
|
+
|
|
|
+REM Function to check if a repository exists and perform git pull or git clone
|
|
|
+:update_repository
|
|
|
+setlocal
|
|
|
+set "repo_url=%~1"
|
|
|
+set "repo_dir=%~2"
|
|
|
+set "repo_branch=%~3"
|
|
|
+
|
|
|
+if exist "%repo_dir%" (
|
|
|
+ rem If the directory exists, then do a git pull
|
|
|
+ echo Updating %repo_dir%...
|
|
|
+ cd "%repo_dir%" || exit /b
|
|
|
+ git pull
|
|
|
+ cd ..
|
|
|
+) else (
|
|
|
+ rem If the directory does not exist, then do a git clone
|
|
|
+ echo Cloning %repo_url% into %repo_dir%...
|
|
|
+ git clone -b %repo_branch% %repo_url% %repo_dir%
|
|
|
+)
|
|
|
+endlocal
|
|
|
+goto :eof
|