2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-08 00:04:38 +00:00

fix: Archive app for different repo/app names

This commit is contained in:
Gavin D'souza 2023-04-21 15:05:16 +05:30
parent 3e448d4d42
commit 3af6058d1b
No known key found for this signature in database
GPG Key ID: 3A7BF4D4340DE6F7
2 changed files with 5 additions and 2 deletions

View File

@ -198,7 +198,7 @@ class App(AppMeta):
@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):
@ -209,7 +209,7 @@ class App(AppMeta):
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)

View File

@ -131,6 +131,9 @@ class Bench(Base, Validator):
except InvalidRemoteException:
if not force:
raise
except ValueError:
pass
self.apps.sync()
# self.build() - removed because it seems unnecessary
self.reload(_raise=False)