Refactor: Cleaned up Vercel, Netlify, and other platform traces. Prepared for VPS deploy.
This commit is contained in:
19
scripts/push_gitea.py
Normal file
19
scripts/push_gitea.py
Normal file
@@ -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/RDO.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 RDO para Gitea...")
|
||||
run_git(["push", "-u", "origin", "main", "--force"])
|
||||
Reference in New Issue
Block a user