Skip to content

Commit

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

class Repo():

class Repo:
def __init__(
self,
url: str,
Expand All @@ -24,7 +25,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 @@ -61,6 +62,7 @@ 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 @@ -73,9 +75,7 @@ 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 07445be

Please sign in to comment.