From b85651653b8511fe8f683fb8f101a1be0178b27d Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Fri, 17 Jan 2020 19:42:05 +0530 Subject: [PATCH] fix: validate branch error message + cleanup --- bench/app.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/bench/app.py b/bench/app.py index b1fddfce..422502ff 100755 --- a/bench/app.py +++ b/bench/app.py @@ -423,14 +423,22 @@ def get_apps_json(path): return json.load(f) def validate_branch(): - installed_apps = get_apps() - check_apps = ['frappe', 'erpnext'] #this is a dirty work-around. bench update should not assume that erpnext is installed - intersection_apps = list(set(installed_apps) & set(check_apps)) + installed_apps = set(get_apps()) + check_apps = set(['frappe', 'erpnext']) + intersection_apps = installed_apps and check_apps + for app in intersection_apps: branch = get_current_branch(app) if branch == "master": - print(''' master branch is renamed to version-11 and develop to version-12. Please switch to new branches to get future updates. + print("""'master' branch is renamed to 'version-11' since 'version-12' release. +As of January 2020, the following branches are +version Frappe ERPNext +11 version-11 version-11 +12 version-12 version-12 +13 develop develop + +Please switch to new branches to get future updates. +To switch to your required branch, run the following commands: bench switch-to-branch [branch-name]""") -To switch to version 11, run the following commands: bench switch-to-branch version-11''') sys.exit(1)