Spaces:
Sleeping
Sleeping
File size: 493 Bytes
231929f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #!/usr/bin/env python3
"""Helper script to push git changes."""
import subprocess
import sys
import os
env = os.environ.copy()
env["http_proxy"] = "http://127.0.0.1:1080"
env["https_proxy"] = "http://127.0.0.1:1080"
result = subprocess.run(
["git", "push", "origin", "main"],
cwd="hf_webdav/space-git",
env=env,
capture_output=True,
text=True,
timeout=120
)
print(result.stdout)
if result.stderr:
print(result.stderr, file=sys.stderr)
sys.exit(result.returncode)
|