From cac837547c67fdfd89d3c7f4d916000600732e2b Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Wed, 27 May 2020 19:56:45 +0530 Subject: [PATCH 1/6] fix: maintain worker and worker.error logfile in dev mode --- bench/config/templates/Procfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bench/config/templates/Procfile b/bench/config/templates/Procfile index e557f561..f810506e 100644 --- a/bench/config/templates/Procfile +++ b/bench/config/templates/Procfile @@ -11,9 +11,9 @@ watch: bench watch {% endif %} {% if use_rq -%} schedule: bench schedule -worker_short: bench worker --queue short --quiet -worker_long: bench worker --queue long --quiet -worker_default: bench worker --queue default --quiet +worker_short: bench worker --queue short 1>> logs/worker.log 2>> logs/worker.error.log +worker_long: bench worker --queue long 1>> logs/worker.log 2>> logs/worker.error.log +worker_default: bench worker --queue default 1>> logs/worker.log 2>> logs/worker.error.log {% else %} workerbeat: sh -c 'cd sites && exec ../env/bin/python -m frappe.celery_app beat -s scheduler.schedule' worker: sh -c 'cd sites && exec ../env/bin/python -m frappe.celery_app worker -n jobs@%h -Ofair --soft-time-limit 360 --time-limit 390' From 649997efba90d3f1bbaa7364a4647a6a6106d5be Mon Sep 17 00:00:00 2001 From: gavin Date: Thu, 28 May 2020 20:15:04 +0530 Subject: [PATCH 2/6] docs: re-link installation docs --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 0b2d03da..6d4be94d 100755 --- a/README.md +++ b/README.md @@ -147,6 +147,11 @@ For more information and advanced setup instructions, check out the [Easy Instal ### Manual Installation Although not recommended, some might want to manually setup a bench instance locally for development. To quickly get started on installing bench the hard way, you can follow [Installing Bench and Frappe](https://frappe.io/docs/user/en/installation). + + ```sh + $ pip install frappe-bench + ``` +Next you'll have to set up the pre-requisites for setting up a Frappe Environment. Checkout [docs/installation](https://github.com/frappe/bench/blob/master/docs/installation.md) for more information on this. For more extensive distribution-dependent documentation, check out the following guides: From a728416c08450e19c6e251d23d5429ee4fb36a68 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Fri, 29 May 2020 10:31:52 +0530 Subject: [PATCH 3/6] fix: update bench install methods --- README.md | 13 +++++++------ docs/installation.md | 7 ++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 6d4be94d..9c521edb 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@
- +

Bench

@@ -141,17 +141,18 @@ In case the setup fails, the log file is saved under `/tmp/logs/install_bench.lo - Create an Issue in this repository with the log file attached. - Search for an existing issue or post the log file on the [Frappe/ERPNext Discuss Forum](https://discuss.erpnext.com/c/bench) with the tag `installation_problem` under "Install/Update" category. -For more information and advanced setup instructions, check out the [Easy Install Documentation](https://github.com/frappe/bench/blob/master/docs/easy_install.md). +For more information and advanced setup instructions, check out the [Easy Install Documentation](https://github.com/frappe/bench/blob/develop/docs/easy_install.md). ### Manual Installation Although not recommended, some might want to manually setup a bench instance locally for development. To quickly get started on installing bench the hard way, you can follow [Installing Bench and Frappe](https://frappe.io/docs/user/en/installation). - + ```sh $ pip install frappe-bench ``` -Next you'll have to set up the pre-requisites for setting up a Frappe Environment. Checkout [docs/installation](https://github.com/frappe/bench/blob/master/docs/installation.md) for more information on this. + +Next you'll have to set up the pre-requisites for setting up a Frappe Environment. Checkout [docs/installation](https://github.com/frappe/bench/blob/develop/docs/installation.md) for more information on this. For more extensive distribution-dependent documentation, check out the following guides: @@ -205,12 +206,12 @@ For more extensive distribution-dependent documentation, check out the following ``` -For more in-depth information on commands and their usage, follow [Commands and Usage](https://github.com/frappe/bench/blob/master/docs/commands_and_usage.md). As for a consolidated list of bench commands, check out [Bench Usage](https://github.com/frappe/bench/blob/master/docs/bench_usage.md). +For more in-depth information on commands and their usage, follow [Commands and Usage](https://github.com/frappe/bench/blob/develop/docs/commands_and_usage.md). As for a consolidated list of bench commands, check out [Bench Usage](https://github.com/frappe/bench/blob/develop/docs/bench_usage.md). ## Custom Bench Commands -If you wish to extend the capabilities of bench with your own custom Frappe Application, you may follow [Adding Custom Bench Commands](https://github.com/frappe/bench/blob/master/docs/bench_custom_cmd.md). +If you wish to extend the capabilities of bench with your own custom Frappe Application, you may follow [Adding Custom Bench Commands](https://github.com/frappe/bench/blob/develop/docs/bench_custom_cmd.md). ## Bench Manager diff --git a/docs/installation.md b/docs/installation.md index a7e0f06a..3d4d004e 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -30,9 +30,6 @@ To manually install frappe/erpnext, you can follow this [this wiki](https://gith #### 2. Install Bench -Install bench as a *non root* user, +Install the latest bench using pip - git clone https://github.com/frappe/bench ~/.bench - pip3 install --user -e ~/.bench - -Note: Please do not remove the bench directory the above commands will create + pip3 install frappe-bench From 5a6c8262a18914509a16ee7f58e98db7cd7e1ac7 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Fri, 29 May 2020 10:39:15 +0530 Subject: [PATCH 4/6] docs: minor restructure for manual installation --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9c521edb..51ecdade 100755 --- a/README.md +++ b/README.md @@ -146,13 +146,14 @@ For more information and advanced setup instructions, check out the [Easy Instal ### Manual Installation -Although not recommended, some might want to manually setup a bench instance locally for development. To quickly get started on installing bench the hard way, you can follow [Installing Bench and Frappe](https://frappe.io/docs/user/en/installation). +Some might want to manually setup a bench instance locally for development. To quickly get started on installing bench the hard way, you can follow the guide on [Installing Bench and the Frappe Framework](https://frappe.io/docs/user/en/installation). - ```sh - $ pip install frappe-bench - ``` +You'll have to set up the system dependencies required for setting up a Frappe Environment. Checkout [docs/installation](https://github.com/frappe/bench/blob/develop/docs/installation.md) for more information on this. If you've already set up, install bench via pip: -Next you'll have to set up the pre-requisites for setting up a Frappe Environment. Checkout [docs/installation](https://github.com/frappe/bench/blob/develop/docs/installation.md) for more information on this. + +```sh +$ pip install frappe-bench +``` For more extensive distribution-dependent documentation, check out the following guides: From e26a0a9b37237bcf97a3a0df9bb66937e56b6439 Mon Sep 17 00:00:00 2001 From: gavin Date: Tue, 2 Jun 2020 13:32:20 +0530 Subject: [PATCH 5/6] chore: fixed image src --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 51ecdade..d9c2d1bb 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@
- +

Bench

From 52ee67f298adb9939d9cee1266250968f35e8c0b Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 10 Jun 2020 14:11:33 +0530 Subject: [PATCH 6/6] fix: trailing slash deleting apps folder --- bench/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bench/app.py b/bench/app.py index 8b165b2b..d20e5a8c 100755 --- a/bench/app.py +++ b/bench/app.py @@ -116,7 +116,7 @@ def get_app(git_url, branch=None, bench_path='.', skip_assets=False, verbose=Fal sys.exit(1) # Gets repo name from URL - repo_name = git_url.rsplit('/', 1)[1].rsplit('.', 1)[0] + repo_name = git_url.rstrip('/').rsplit('/', 1)[1].rsplit('.', 1)[0] shallow_clone = '--depth 1' if check_git_for_shallow_clone() else '' branch = '--branch {branch}'.format(branch=branch) if branch else '' else: