mirror of
https://github.com/Balshgit/different
synced 2025-12-12 23:00:38 +03:00
add gitlab submodules script
This commit is contained in:
1
get-gitlab-projects/get_project_core/.gitignore
vendored
Normal file
1
get-gitlab-projects/get_project_core/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.env
|
||||
4
get-gitlab-projects/get_project_core/__init__.py
Normal file
4
get-gitlab-projects/get_project_core/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
import requests
|
||||
from requests.packages.urllib3.exceptions import InsecureRequestWarning
|
||||
|
||||
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
|
||||
30
get-gitlab-projects/get_project_core/settings.py
Normal file
30
get-gitlab-projects/get_project_core/settings.py
Normal file
@@ -0,0 +1,30 @@
|
||||
import importlib.util
|
||||
import logging
|
||||
import sys
|
||||
|
||||
from decouple import AutoConfig
|
||||
from pathlib import Path
|
||||
|
||||
current_dir = Path(__file__).parent.parent
|
||||
config = AutoConfig(search_path=current_dir.joinpath('get_project_core'))
|
||||
|
||||
|
||||
# use loguru if it is possible for color output
|
||||
if importlib.util.find_spec('loguru') is not None:
|
||||
from loguru import logger
|
||||
logger.remove()
|
||||
logger.add(sink=sys.stdout, colorize=True, level='DEBUG',
|
||||
format="<cyan>{time:DD.MM.YYYY HH:mm:ss}</cyan> | <level>{level}</level> | "
|
||||
"<magenta>{message}</magenta>")
|
||||
|
||||
# use standard logging
|
||||
else:
|
||||
logger = logging.getLogger()
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
console_handler = logging.StreamHandler()
|
||||
console_handler.setLevel(logging.INFO)
|
||||
log_formatter = logging.Formatter("%(asctime)s | %(levelname)s | %(message)s")
|
||||
console_handler.setFormatter(log_formatter)
|
||||
|
||||
logger.addHandler(console_handler)
|
||||
3
get-gitlab-projects/get_project_core/update-repos.sh
Executable file
3
get-gitlab-projects/get_project_core/update-repos.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
git pull --all
|
||||
Reference in New Issue
Block a user