From c6c7abe74d92163018f9af22cf63e7880e1393b4 Mon Sep 17 00:00:00 2001 From: Marcos Date: Sun, 22 Mar 2026 21:22:08 -0300 Subject: [PATCH] 1 --- scripts/push_gitea.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 scripts/push_gitea.py diff --git a/scripts/push_gitea.py b/scripts/push_gitea.py new file mode 100644 index 0000000..988b118 --- /dev/null +++ b/scripts/push_gitea.py @@ -0,0 +1,19 @@ +import subprocess +import os + +repo_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +# @@ -> %40%40 (Codificação URL padrão para caracteres especiais) +remote_url = "https://admtracksteel:%40%40Gi05Br;;@git.reifonas.cloud/admtracksteel/dbmaker.git" + +def run_git(args): + result = subprocess.run(["git"] + args, cwd=repo_dir, capture_output=True, text=True) + if result.returncode != 0: + print(f"Erro em git {' '.join(args)}: {result.stderr}") + else: + print(f"Sucesso em git {' '.join(args)}") + return result.returncode + +run_git(["remote", "set-url", "origin", remote_url]) +run_git(["branch", "-M", "main"]) +print("Iniciando Push de DBMaker para Gitea...") +run_git(["push", "-u", "origin", "main", "--force"])