2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-25 07:58:24 +00:00

308 Commits

Author SHA1 Message Date
Gavin D'souza
1865eeeb6d feat(minor): App Meta handling on disk repos 2021-10-20 19:33:16 +05:30
Gavin D'souza
38382b84fb feat: Initialize bench on bench get(-app) if not created
Why bother creating a bench well in advance? If someone wants to install
your app, they should be able to with a single command.

For instance, you can run simply `bench get healthcare` in any directory and bench will be setup automatically
2021-10-20 01:05:40 +05:30
Gavin D'souza
906ad5a099 feat: bench drop {bench_path}
* Drops bench if no sites' folders found
* Tries to drop crontab entry made for backups
2021-10-20 00:43:46 +05:30
Gavin D'souza
ce00798b5d feat: App Meta Base Class
* Less messier way of setting up and managing pre-fetched app meta
* Added support to fetch apps using the GitHub org/repo pattern
* Can be used to get apps and easily handle dependencies through version
  identifiers
2021-10-20 00:37:36 +05:30
kevgeni
641181260e
fix: Allow git url with custom username (#1200)
Allow git url with custom user, and not just the git user.
2021-09-17 15:29:14 +05:30
Ankush Menat
b51f0ed2b2
feat: bench setup requirements --dev (#1196)
* chore: typo

* chore: update project description

* feat: command to install dev-requirements.txt

Often applications have development or test specific requirements which
are not required in production.

- Add new command `bench setup dev-requirements`
- installs all `dev-requirements.txt` in app's root folder.

* refactor: remove duplicate function

* refactor: use `log` instead of print

* refactor: merge dev-requirement command

* feat: install dev-dependencies in get-app if dev

When developer mode is enabled install all dev dependencies too while
doing `get-app`

* fix: warn about --dev not supporting node
2021-09-13 20:55:21 +05:30
Abhishek Balam
6137086e03
feat: Set default version for easy install to v13 (#1189)
* feat: set default version for easy install to v13

* fix: python version based version picking fixed and reverted changes to node version in installation script

* fix: revert test version

Co-authored-by: gavin <gavin18d@gmail.com>
2021-08-30 12:29:09 +05:30
Gavin D'souza
5e0d46db24 Merge branch 'develop' into perf-remove-app 2021-05-13 14:18:15 +05:30
Gavin D'souza
54d48f61a3 fix: Remove PY2 compatibility code
* Set Python requires Python 3.6+ but < Py4
* Remove six from dependencies
* Use click.confirm instead of self implemented confirm code
* Fix imports for 3.6+ compatibility

References for updated imports:
* https://docs.python.org/3/library/configparser.html
* https://docs.python.org/3/library/urllib.request.html#legacy-interface
* https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlparse
* https://docs.python.org/3/library/importlib.html#importlib.reload
2021-05-11 12:01:32 +05:30
Gavin D'souza
5d563f23ab style: Use f-strings instead of old string formatting methods
These changes are valid only for Py3.6+ and will remove bench CLI
support for Python 3.5 and lesser.

* Converted to f-strings using flynt
* Manual conversion of failed cases
* Simplification of logic
2021-05-11 11:30:27 +05:30
Gavin D'souza
dcdb15d471 fix: Handle command execution failures 2021-05-10 19:10:06 +05:30
gavin
0c21718f7a
Merge branch 'develop' into perf-remove-app 2021-05-10 18:51:57 +05:30
Gavin D'souza
4cadf2c719 fix: Unshallow clone if update without --reset
If an unshallow clone has to be updated, the only way to update it
without a reset will require an unshallow. This is because there may be
uncommitted or committed changes in any of the apps, although unfavoured
should be handled safely. The only way to update such repos is via the
user configured settings..or a ff only merge.
2021-05-10 14:45:46 +05:30
Gavin D'souza
ebc3cebd19 perf: Faster bench remove-app
Biggest bottleneck is in the validation stage which checks if the app is
installed on any existing sites on the bench. instead of triggering
multiple list-apps for each sites, do one for all.
2021-05-05 16:34:10 +05:30
Gavin D'souza
b0ccb6efbe fix: Invoke pip via python
Due to "WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly."
2021-04-23 18:37:03 +05:30
Gavin D'souza
f04a9e6e0d chore: Remove deprecated command switch-to-master 2021-04-23 11:25:24 +05:30
gavin
4b31ac078b
Merge pull request #1130 from CaseSolvedUK/shallow_pull
feat: Keep repos shallow if --reset and shallow_clone are specified in bench update --pull
2021-04-23 10:28:47 +05:30
Gavin D'souza
1e56d04e94 Merge branch 'develop' of github.com:frappe/bench into declarative-setup-bench 2021-04-20 10:56:33 +05:30
Sagar Vora
ec2ce0f3b8 chore: remove support for older versions of frappe 2021-04-13 13:06:08 +05:30
casesolved-co-uk
a1db48b57e fix: serious bug capable of deleting apps path 2021-03-17 16:20:47 +00:00
Richard Case
0ff8dddef9 fix: only get the specific branch for version check 2021-03-17 16:20:47 +00:00
Richard Case
895c403278 fix: only fetch current branch 2021-03-17 16:20:47 +00:00
Richard Case
82173c1d42 fix: only fetch what is necessary, simplify & improve grepability 2021-03-17 16:20:47 +00:00
Richard Case
66240e1f8d feat: Keep repos shallow if --reset is specified and shallow_clone is set 2021-03-17 16:20:47 +00:00
Aditya Hase
5d90346660
perf: Remove six.moves.reload_module from the import tree 2021-02-21 11:12:57 +05:30
Aditya Hase
2df0bf726d
perf: Remove semantic_version from the import tree 2021-02-21 11:12:40 +05:30
Aditya Hase
07ecaa1f77
perf: Remove shutil from the import tree 2021-02-21 11:12:00 +05:30
Aditya Hase
c5d2fb9255
perf: Remove bench.config.common_site_config from the import tree 2021-02-21 10:06:44 +05:30
Aditya Hase
df773d4f9f
perf: Remove git from the import tree 2021-02-20 13:22:56 +05:30
Aditya Hase
cc92584927
perf: Remove requests from the import tree 2021-02-20 13:14:56 +05:30
Gavin D'souza
3ddbff4eaa chore: Assign variables to simplify block 2020-09-10 11:49:03 +05:30
gavin
aa1a1b9a71
fix: Return repo_name if app_name doesn't exist 2020-09-10 11:44:45 +05:30
Chinmay D. Pai
186ba280f1
fix: add declarative config support for bench
bench will attempt to read name and version from setup.cfg before trying
to access setup.py for details

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-06-23 14:24:14 +05:30
gavin
70cb41fa0d
Merge branch 'develop' into fix-delete 2020-06-10 14:46:29 +05:30
Shivam Mishra
52ee67f298 fix: trailing slash deleting apps folder 2020-06-10 14:11:33 +05:30
Gavin D'souza
4480ea21ac chore(logging) set logging level to INFO 2020-05-21 12:45:28 +05:30
gavin
89dd9721c2
Merge pull request #975 from Thunderbottom/skip-restart-on-setup-req
chore: skip restart on bench setup requirements
2020-05-21 11:08:19 +05:30
gavin
119b08f531
Merge pull request #998 from gavindsouza/drop-dead-code
chore: drop dead code
2020-05-21 10:45:07 +05:30
gavin
56c2e14514
Merge branch 'develop' into skip-restart-on-setup-req 2020-05-21 10:23:37 +05:30
gavin
0185300afd
Merge branch 'develop' into drop-dead-code 2020-05-21 10:20:35 +05:30
gavin
e239f69fc2
Merge branch 'develop' into skip-restart-on-setup-req 2020-05-21 10:20:00 +05:30
gavin
7f3e4b9fbb
Merge branch 'develop' into fix-setup-requirements 2020-05-20 20:09:45 +05:30
Gavin D'souza
1bb07166d4 chore: drop check_url 2020-05-20 18:34:07 +05:30
gavin
1935afa634
Merge branch 'develop' into fix-setup-requirements 2020-05-20 17:34:24 +05:30
gavin
26e118a3d7
Merge branch 'develop' into bench-logger 2020-05-20 17:34:06 +05:30
gavin
ca6483ff70
Merge branch 'develop' into drop-dead-code 2020-05-20 17:33:53 +05:30
gavin
78c1b24345
Merge branch 'develop' into skip-restart-on-setup-req 2020-05-20 17:33:40 +05:30
Chinmay D. Pai
e52dc985c7
chore: rename postprocess to restart_bench
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-05-19 18:23:59 +05:30
Chinmay D. Pai
a4a9b59f42
fix: build assets regardless of postprocess
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-05-19 18:17:38 +05:30
Gavin D'souza
dd047002a1 fix: dont run ayrn install while setting up py reqs 2020-05-19 14:14:01 +05:30