2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-14 09:14:04 +00:00

fix: Archived app naming, apps.txt sync

* apps.txt wasn't being synced in time so the build was failing, this
  changes that
* Apps archived on the same day weren't being numbered properly...it
  went from _1 to _1_2 and so forth. This is fixed to show _1, _2 and so
  on
This commit is contained in:
Gavin D'souza 2021-11-13 14:54:08 +05:30
parent c636c7c133
commit 79980c3c55
2 changed files with 6 additions and 9 deletions

View File

@ -144,9 +144,9 @@ class App(AppMeta):
dt = f"{self.repo}-{datetime.date.today()}" dt = f"{self.repo}-{datetime.date.today()}"
if os.path.exists(os.path.join("archived", "apps", dt)): if os.path.exists(os.path.join("archived", "apps", dt)):
for num in range(1, 100): for num in range(1, 100):
dt = f"{dt}_{num}" _dt = f"{dt}_{num}"
if not os.path.exists(os.path.join("archived", "apps", dt)): if not os.path.exists(os.path.join("archived", "apps", _dt)):
return dt return _dt
return dt return dt
src = os.path.join("apps", self.repo) src = os.path.join("apps", self.repo)
@ -304,7 +304,6 @@ def get_app(
app.get() app.get()
app.install(verbose=verbose, skip_assets=skip_assets) app.install(verbose=verbose, skip_assets=skip_assets)
bench.apps.sync()
def new_app(app, bench_path="."): def new_app(app, bench_path="."):
@ -341,10 +340,10 @@ def install_app(
if os.path.exists(os.path.join(app_path, "package.json")): if os.path.exists(os.path.join(app_path, "package.json")):
exec_cmd("yarn install", cwd=app_path) exec_cmd("yarn install", cwd=app_path)
add_to_appstxt(app, bench_path=bench_path) bench = Bench(bench_path)
bench.apps.sync()
conf = Bench(bench_path).conf
conf = bench.conf
if conf.get("developer_mode"): if conf.get("developer_mode"):
from bench.utils.bench import install_python_dev_dependencies from bench.utils.bench import install_python_dev_dependencies

View File

@ -77,8 +77,6 @@ def init(
if apps_path: if apps_path:
install_apps_from_path(apps_path, bench_path=path) install_apps_from_path(apps_path, bench_path=path)
bench.apps.sync()
if not skip_assets: if not skip_assets:
build_assets(bench_path=path) build_assets(bench_path=path)