Skip to content

Commit

Permalink
fix: Archive app for different repo/app names
Browse files Browse the repository at this point in the history
  • Loading branch information
gavindsouza committed May 31, 2023
1 parent 3e448d4 commit 3af6058
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bench/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def get(self):

@step(title="Archiving App {repo}", success="App {repo} Archived")
def remove(self, no_backup: bool = False):
active_app_path = os.path.join("apps", self.repo)
active_app_path = os.path.join("apps", self.app_name)

if no_backup:
if not os.path.islink(active_app_path):
Expand All @@ -209,7 +209,7 @@ def remove(self, no_backup: bool = False):
else:
archived_path = os.path.join("archived", "apps")
archived_name = get_available_folder_name(
f"{self.repo}-{date.today()}", archived_path
f"{self.app_name}-{date.today()}", archived_path
)
archived_app_path = os.path.join(archived_path, archived_name)

Expand Down
3 changes: 3 additions & 0 deletions bench/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ def uninstall(self, app, no_backup=False, force=False):
except InvalidRemoteException:
if not force:
raise
except ValueError:
pass

self.apps.sync()
# self.build() - removed because it seems unnecessary
self.reload(_raise=False)
Expand Down

0 comments on commit 3af6058

Please sign in to comment.