Skip to content

Commit

Permalink
remove folder after pushing
Browse files Browse the repository at this point in the history
  • Loading branch information
DelightReza committed Jul 7, 2024
1 parent 0820e39 commit caf5e7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rebase/infinity.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
# Cloning repositories, rebasing and pushing
for repo in infinity:
if os.path.exists(repo["local_path"]):
os.system(f"cd {repo['local_path']} && git fetch {repo['upstream_url']} {repo['upstream_branch']} && git rebase FETCH_HEAD && git push {repo['remote_url']} --force {repo['remote_branch']}")
os.system(f"cd {repo['local_path']} && git fetch {repo['upstream_url']} {repo['upstream_branch']} && git rebase FETCH_HEAD && git push {repo['remote_url']} --force {repo['remote_branch']} && cd .. && rm -rf {repo['local_path']}")
else:
os.system(f"git clone {repo['remote_url']} -b {repo['remote_branch']} {repo['local_path']}")
os.system(f"cd {repo['local_path']} && git fetch {repo['upstream_url']} {repo['upstream_branch']} && git rebase FETCH_HEAD && git push {repo['remote_url']} --force {repo['remote_branch']}")
os.system(f"cd {repo['local_path']} && git fetch {repo['upstream_url']} {repo['upstream_branch']} && git rebase FETCH_HEAD && git push {repo['remote_url']} --force {repo['remote_branch']} && cd .. && rm -rf {repo['local_path']}")
4 changes: 2 additions & 2 deletions rebase/pixelos.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# Cloning repositories, rebasing and pushing
for repo in pixelos:
if os.path.exists(repo["local_path"]):
os.system(f"cd {repo['local_path']} && git fetch {repo['upstream_url']} {repo['upstream_branch']} && git rebase FETCH_HEAD && git push {repo['remote_url']} --force {repo['remote_branch']}")
os.system(f"cd {repo['local_path']} && git fetch {repo['upstream_url']} {repo['upstream_branch']} && git rebase FETCH_HEAD && git push {repo['remote_url']} --force {repo['remote_branch']} && cd .. && rm -rf {repo['local_path']}")
else:
os.system(f"git clone {repo['remote_url']} -b {repo['remote_branch']} {repo['local_path']}")
os.system(f"cd {repo['local_path']} && git fetch {repo['upstream_url']} {repo['upstream_branch']} && git rebase FETCH_HEAD && git push {repo['remote_url']} --force {repo['remote_branch']}")
os.system(f"cd {repo['local_path']} && git fetch {repo['upstream_url']} {repo['upstream_branch']} && git rebase FETCH_HEAD && git push {repo['remote_url']} --force {repo['remote_branch']} && cd .. && rm -rf {repo['local_path']}")

0 comments on commit caf5e7d

Please sign in to comment.