Skip to content

Commit

Permalink
Updated build
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroHG committed Aug 13, 2024
1 parent 7bd8b4d commit 37d61fd
Show file tree
Hide file tree
Showing 2 changed files with 407 additions and 261 deletions.
12 changes: 6 additions & 6 deletions scripts/update_private.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
private_dir = ""
private_repo_url = ""


class Repo:
class Repo():
def __init__(
self,
url: str,
Expand All @@ -25,7 +24,7 @@ def __init__(
self.commit_id = commit_id
self.branch = branch
self.delete_before_checkout = delete_before_checkout

def current_branch(self):
git_dir = os.path.join(self.base_dir, ".git")
return (
Expand Down Expand Up @@ -62,7 +61,6 @@ def checkout_branch(self, remote="origin"):

os.chdir(cwd)


"""
Script that maintains the Private directory checkout - intended to be run
immediately after switching branches in the parent ai2thor project
Expand All @@ -75,7 +73,9 @@ def checkout_branch(self, remote="origin"):
private_dir = sys.argv[1]
private_repo_url = sys.argv[2]
if not os.path.isdir(private_dir) and os.path.exists(private_dir):
raise Exception(f"Private directory {private_dir} is not a directory - please remove")
raise Exception(
f"Private directory {private_dir} is not a directory - please remove"
)
else:
repo = Repo(url=private_repo_url, target_dir=private_dir, delete_before_checkout=True)
repo = Repo(url = private_repo_url, target_dir = private_dir, delete_before_checkout=True)
repo.checkout_branch()
Loading

0 comments on commit 37d61fd

Please sign in to comment.