-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsync_cloud.py
More file actions
27 lines (21 loc) · 899 Bytes
/
Copy pathsync_cloud.py
File metadata and controls
27 lines (21 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import os
import subprocess
PROJECT_DIR = os.path.expanduser("~/str8zero_engine")
def run_cmd(command):
print(f" [+] Executing: {command}")
result = subprocess.run(command, shell=True, cwd=PROJECT_DIR, text=True)
if result.returncode != 0:
print(f" [!] Notice on: {command}")
def sync_repository():
print("[Str8Zero Sync] Enforcing SSH remote & pushing state...")
os.chdir(PROJECT_DIR)
# Enforce SSH remote URL instead of HTTPS
run_cmd("git remote set-url origin git@github.com:Str8ZeroOS/str8zero_engine.git")
# Stage, commit, and push
run_cmd("git status")
run_cmd("git add .")
run_cmd('git commit -m "Field terminal sync from A1286 client deck" || echo "No changes to commit"')
run_cmd("git push -u origin main")
print("[Str8Zero Sync] Synchronization sequence complete!")
if __name__ == "__main__":
sync_repository()