2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-23 04:29:02 +00:00
Commit Graph

300 Commits

Author SHA1 Message Date
Ankush Menat
ab9b6172a4
feat: bench validate-dependencies command (#1534)
This validates all `frappe-dependencies` and exits with 1 if any of
specifications fail.

This will be internal feature for FC for now. If this works well we can
make the validation fail during install-app itself without requiring any
additional command/steps.
2024-02-07 18:27:54 +05:30
Alan
8c125c6f62
Merge branch 'develop' into get-app-cache 2024-01-23 15:07:13 +05:30
18alantom
c5ec4f7528 chore: rename commit-hash to cache-key 2024-01-19 19:18:13 +05:30
18alantom
42ac015bff feat: add bench app-cache helper command 2024-01-19 14:59:28 +05:30
Akhil Narang
9460a46ac3
chore: simplify output of bench setup supervisor when supervisor isn't installed
Seeing the whole stacktrace isn't too useful here

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-01-15 13:34:58 +05:30
Akhil Narang
7a89ccd53a
fix: wrong help string
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-01-15 13:33:49 +05:30
18alantom
87d4aa3b10 feat: cache get-app artifacts by commit_hash 2024-01-15 12:02:47 +05:30
Ankush Menat
f29e25a5d2 feat: flag to setup bench with developer mode enabled
Dev dependencies are not installed if developer_mode is not enabled.
When creating a new bench it's not possible to modify this config
upfront, so offer a flag to do it instead.

Note:
- Disabled by default.
- Very few people need this, those who write and run tests locally primarily.
- You mostly should not do this in CI, do `bench setup requirements --dev` explicitly instead.
2023-11-02 14:28:21 +05:30
Akhil Narang
8f3f1a48a6
refactor(treewide): use mariadb commands and service instead of mysql
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-10-10 13:49:03 +05:30
Ankush Menat
036cb6291e
fix: don't compile python files manually. (#1469) 2023-07-04 19:52:05 +05:30
Sagar Vora
dc047a5e7d fix: dont use glob pattern for python exec 2022-08-07 01:36:16 +05:30
Gavin D'souza
bbf0169994 fix(nginx): Allow specifying log_format setting
Changes
* Added sugared option class that allows setting options only if another
  is set
* setup nginx command allows to set logging level & log_format options
2022-08-04 16:00:27 +05:30
Gavin D'souza
5370129283 feat(nginx): Allow logging settings as site/combined/none 2022-08-04 14:10:09 +05:30
Gavin D'souza
f734eef7a7 refactor: check_supervisord_config 2022-08-04 12:15:51 +05:30
Gavin D'souza
a3af905d92 feat: Allow skipping supervisord config check in setup supervisor 2022-08-04 12:13:10 +05:30
gavin
18a954b88c
Merge pull request #1349 from gavindsouza/frappe-cmd-cache-bye
fix: Remove frappe cmd caching in .bench.cmd
2022-08-02 14:38:37 +05:30
Gavin D'souza
f77352966b fix: Remove frappe cmd caching in .bench.cmd 2022-08-02 13:14:55 +05:30
Gavin D'souza
24b9af605b fix: Use python* to match any pattern in env 2022-08-02 11:59:34 +05:30
Gavin D'souza
f60c2d0def fix: Use venv module instead of virtualenv
Only migrate-env requires virtualenv wrapper. However, it can be
installed and run manually too. Virtualenv wrapper is patched in debian
to change the path of bins - which venv is free from.
2022-08-02 11:54:00 +05:30
gavin
0cd5fca322
fix: Remove backup command (#1345)
bench's backup command is redundant and acts as a wrapper over Frappe's
backup command. This caused a conflict with Frappe's CLI after the
resolution correction introduced via a6f196440a

ref: https://github.com/frappe/frappe/runs/7592331617
2022-07-31 22:28:32 +05:30
Gavin D'souza
a84239d6ab refactor: Bench
* Drop patches of v3 & v4
* Re-write buggy / broken code wrt hints by pre-commit checks
* Auto-format and transform code
* Remove re-written & mutable function defaults
2022-07-27 14:39:22 +05:30
Gavin D'souza
4fcda9ae22 chore: Drop release project
Release is yet another dead / unmaintained project in bench. It used to
be in action - the tool to release ERPNext & Frappe for years but we've
moved to other automated pipelines (that have been around for a while
too). Time to say good-bye to these commands too 👋
2022-06-14 15:41:22 +05:30
Devin Slauenwhite
e69b612035 feat: get-app ln -s 2022-06-03 04:47:23 +00:00
gavin
69e14e512f feat(remove-app): Options for no backup of app & force removal 2022-05-19 13:00:09 +05:30
Aradhya
d514f84d5f merge: merged develop into dependency-resolution 2022-03-21 21:50:24 +05:30
Gavin D'souza
af14bafe21 fix(restart): Setup restarts vars with fallback 2022-03-21 13:37:16 +05:30
Gavin D'souza
7a4ade9192 fix: Try setting supervisord conditionally 2022-03-17 13:03:04 +05:30
Aradhya
6d05fe2f53 Merge branch 'develop' of github.com:Aradhya-Tripathi/bench into dependency-resolution 2022-02-25 16:27:41 +05:30
Aradhya
6e4f121fc6 Merge branch 'develop' of github.com:Aradhya-Tripathi/bench into dependency-resolution 2022-02-22 13:31:00 +05:30
Sagar Vora
3c5944623a fix: clearer docstrings 2022-02-19 09:50:20 +05:30
DaizyModi
28e681689f
feat: Setup Requirements for specific apps (#1265)
* feat:  flag for Setup Requirements

* chore: Moved __get_installed_app method in Bench

* fix: improve help message

* fix: allow muliple apps to be specified

Co-authored-by: Sagar Vora <sagar@resilient.tech>
Co-authored-by: gavin <gavin18d@gmail.com>
2022-02-18 17:34:39 +05:30
Aradhya
80cfb9dfb4 refactor: changed resolve to resolve-deps 2022-02-07 10:23:22 +05:30
Aradhya
2363fe38d5 refactor: moved resolve and install to get-app 2022-02-07 09:53:55 +05:30
Aradhya
7a311a242d feat: Added bench command for resolve and install 2022-02-07 09:31:15 +05:30
Gavin D'souza
814bcc6320 refactor: Bench restart
* Commonify reloading processes' logic
* Add functionality to restart web workers in development
* Use Bench.reload instead
2021-12-02 14:21:52 +05:30
phot0n
2a25a6d2d9 feat: add no-git option to new-app command 2021-12-01 00:00:18 +05:30
Gavin D'souza
a17af670df style: Black-ish make & app 2021-11-29 18:57:40 +05:30
Gavin D'souza
8480eb5df7 feat(minor): --install-app option in init 2021-11-29 18:55:21 +05:30
Gavin D'souza
a2ccc30bc3 fix: Initialize bench in get-app with --init-bench 2021-11-29 18:34:58 +05:30
Gavin D'souza
1b2bb87ab7 refactor: Bench verbosity
It's off by default. If you want it enabled, pass --verbose or -v
following `bench`. The verbosity only changes how pip installs work.
Other stuff is immaterial at this point.

Eg: bench -v setup requirements
2021-11-26 16:24:56 +05:30
Gavin D'souza
6d10d75bb1 fix: Show pip's help menu when --help is passed in pip command 2021-11-18 18:07:32 +05:30
Gavin D'souza
7c4b6cea2b style: Black-ish + Flake8 2021-11-18 12:02:37 +05:30
Gavin D'souza
b92fb1401b feat: Pass --use-feature='dynamic-feed' for new CLI 2021-11-18 12:02:03 +05:30
Gavin D'souza
806d543fac fix: Show traceback if error occurs during init, get outside bench dir 2021-11-18 01:04:02 +05:30
Gavin D'souza
cd252d3476 refactor: setup dev requirements
* Remove unwanted log message 🤢. It was inconsistent...this had to be
  done...rip
* Fix missing import - install_python_dev_dependencies
* Don't setup node + python requirements when --dev flag is passed
2021-11-17 23:56:55 +05:30
Gavin D'souza
30e3e725a8 fix: Show traceback on bench init failure
Other changes:
* Invoke internal init function instead of invoking click
command. This was done to avoid handling random Exceptions that are done
in the command definition
* os.chdir after initializing new bench in get_app
2021-11-17 23:55:15 +05:30
Gavin D'souza
6890d98847 feat: Add alias for remove-app: rm, remove 2021-11-13 14:27:25 +05:30
Gavin D'souza
e2fd9de921 fix: Cleanup import hell
There was this bug that said `bench.utils.bench` doesn't have attribute
VERSION or whatever bench/__init__ was supposed to have. Now
bench/utils/__init__ had an `import bench` statement that was supposed
to ask for the top level module...but conflicted with the utils.bench
namespace. Changed the line in utils to `from bench import PROJECT_NAME,
VERSION` and it just works now...oh well

Other changes made were an attempt to cleanup and simplify the multi
level dotted path calls
2021-11-13 01:48:30 +05:30
Gavin D'souza
e08a12477d chore: Get rid of import * utils 2021-11-13 00:19:12 +05:30
Gavin D'souza
4d1ddc4722 refactor: Bench.sync => Bench.apps.sync
* Added missing imports
* Fixed broken import paths
2021-11-12 22:13:27 +05:30