mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 00:21:23 +00:00
fix: Archive app for different repo/app names
This commit is contained in:
parent
3e448d4d42
commit
3af6058d1b
@ -198,7 +198,7 @@ class App(AppMeta):
|
|||||||
|
|
||||||
@step(title="Archiving App {repo}", success="App {repo} Archived")
|
@step(title="Archiving App {repo}", success="App {repo} Archived")
|
||||||
def remove(self, no_backup: bool = False):
|
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 no_backup:
|
||||||
if not os.path.islink(active_app_path):
|
if not os.path.islink(active_app_path):
|
||||||
@ -209,7 +209,7 @@ class App(AppMeta):
|
|||||||
else:
|
else:
|
||||||
archived_path = os.path.join("archived", "apps")
|
archived_path = os.path.join("archived", "apps")
|
||||||
archived_name = get_available_folder_name(
|
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)
|
archived_app_path = os.path.join(archived_path, archived_name)
|
||||||
|
|
||||||
|
@ -131,6 +131,9 @@ class Bench(Base, Validator):
|
|||||||
except InvalidRemoteException:
|
except InvalidRemoteException:
|
||||||
if not force:
|
if not force:
|
||||||
raise
|
raise
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
|
|
||||||
self.apps.sync()
|
self.apps.sync()
|
||||||
# self.build() - removed because it seems unnecessary
|
# self.build() - removed because it seems unnecessary
|
||||||
self.reload(_raise=False)
|
self.reload(_raise=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user