semantic-release-bot
324d8baa45
chore(release): Bumped to Version 5.7.3
...
## [5.7.3](https://github.com/frappe/bench/compare/v5.7.2...v5.7.3 ) (2021-12-28)
### Bug Fixes
* Clear Bench instance cache on every chdir ([ec369a1
](ec369a16a1
))
* PosixPath object has no attribute 'rstrip' ([aaf4856
](aaf48566b7
))
* replace shutil.move with Path.rename ([a648590
](a648590be4
))
2021-12-28 12:48:08 +00:00
Gavin D'souza
911ae1fda0
Merge branch 'staging' into v5.x
2021-12-28 18:17:02 +05:30
Gavin D'souza
8aafc41dc7
Merge branch 'develop' into staging
2021-12-28 18:15:44 +05:30
Gavin D'souza
2fa25d8791
fix: Command picking & execution
...
Parse sys.argv appropriately and use them to match commands "better".
Using hacks to match with flags and options appear to be faulty, so
dropped that. Only matching with command names remains.
Fixes https://github.com/frappe/bench/issues/1223
2021-12-28 13:39:23 +05:30
Gavin D'souza
2caf7e7d15
fix: Set verbosity if --verbose is passed anywhere period
...
Fixes https://github.com/frappe/bench/issues/1224
2021-12-28 12:42:53 +05:30
Gavin D'souza
9802feaa9c
fix: Set correct remote_server for cloning
...
Fixes https://github.com/frappe/bench/issues/1228
2021-12-28 12:35:59 +05:30
Gavin D'souza
217f27f511
fix: Set proper branch to clone
...
Fixes https://github.com/frappe/bench/issues/1242
2021-12-28 12:35:06 +05:30
gavin
b0ad6426a8
Merge pull request #1222 from gavindsouza/reload-bench
...
refactor: bench restart
2021-12-21 15:29:58 +05:30
Dany Robert
fd82585d5f
chore: remove unnecessary shutil import
2021-12-17 19:39:51 +05:30
Dany Robert
a648590be4
fix: replace shutil.move with Path.rename
...
Co-authored-by: gavin <gavin18d@gmail.com>
2021-12-17 19:38:41 +05:30
semantic-release-bot
cacb53429c
chore(release): Bumped to Version 5.7.2
...
## [5.7.2](https://github.com/frappe/bench/compare/v5.7.1...v5.7.2 ) (2021-12-17)
### Bug Fixes
* process SSH git URLs ([660287a
](660287a1a7
))
2021-12-17 12:54:04 +00:00
semantic-release-bot
1b4b186bed
chore(release): Bumped to Version 5.7.1
...
## [5.7.1](https://github.com/frappe/bench/compare/v5.7.0...v5.7.1 ) (2021-12-10)
### Bug Fixes
* process SSH git URLs ([c8494cf
](c8494cffa6
))
2021-12-10 07:16:18 +00:00
Saurabh
ad026a421a
Merge pull request #1231 from frappe/staging
...
chore: Merge staging into v5.x
2021-12-10 12:45:27 +05:30
Dany Robert
aaf48566b7
fix: PosixPath object has no attribute 'rstrip'
2021-12-09 13:03:01 +05:30
Rohan Bansal
c8494cffa6
fix: process SSH git URLs
2021-12-08 16:09:52 +05:30
Rohan Bansal
660287a1a7
fix: process SSH git URLs
2021-12-07 15:16:49 +05:30
Gavin D'souza
ec369a16a1
fix: Clear Bench instance cache on every chdir
2021-12-02 14:22:34 +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
semantic-release-bot
8a3e72ce54
chore(release): Bumped to Version 5.7.0
...
# [5.7.0](https://github.com/frappe/bench/compare/v5.6.0...v5.7.0 ) (2021-12-01)
### Bug Fixes
* Allow git url with custom username ([#1200 ](https://github.com/frappe/bench/issues/1200 )) ([6411812
](641181260e
))
* Archived app naming, apps.txt sync ([79980c3
](79980c3c55
))
* Check if app is installed in env via initialize_apps ([a192240
](a192240cec
))
* Check if archived_sites directory exists before running ([b11f5b0
](b11f5b0f96
))
* Cleanup import hell ([e2fd9de
](e2fd9de921
))
* Cleanup import hell (contd) ([d2fba5f
](d2fba5fe52
))
* correct patches.txt ([a28a0d0
](a28a0d0d23
))
* Don't fetch meta for rm app ([17edb47
](17edb4797b
))
* Drop support for Frappe v4-5-6 ;) ([616dff8
](616dff8fbb
))
* frappe app can exist without public folder ([13ed9be
](13ed9beca5
))
* Handle collisions while moving apps ([3709682
](3709682231
))
* Import bench.cli ([27128c7
](27128c7c18
))
* import path for util ([ee6a967
](ee6a967a20
))
* Initialize bench in get-app with --init-bench ([a2ccc30
](a2ccc30bc3
))
* Move logging to lower level App.get API ([4ba5422
](4ba5422b65
))
* Pass `skip_assets` while resolving dependant apps ([8275d67
](8275d678f4
))
* Patch to move archived_sites to archived/sites ([877e812
](877e812fbb
))
* raise (by default) when exec_cmd fails ([3995b92
](3995b9237b
))
* Raise and handle Exception class ([c4b8391
](c4b8391716
))
* remove unwanted `patches.txt` ([85500b7
](85500b7751
))
* rename key ([75f8462
](75f84625ad
))
* Show bench init job via bench get-app (conditional) ([225fce5
](225fce5be6
))
* Show pip's help menu when --help is passed in pip command ([6d10d75
](6d10d75bb1
))
* Show traceback if error occurs during init, get outside bench dir ([806d543
](806d543fac
))
* Show traceback in dev mode and set exit code on errors ([e074a1d
](e074a1d886
))
* Show traceback on bench init failure ([30e3e72
](30e3e725a8
))
* Show warning while using experimental features ([b7994e2
](b7994e21b1
))
* sync apps file in init, imports and no warn in CI ([71d178d
](71d178dde9
))
* Trailing slash not setting app name properly ([357fcc0
](357fcc0bbd
))
* Use test frappe app - frappe_docs instead of wiki or chat ([c636c7c
](c636c7c133
))
### Features
* add `live_reload` to default_config ([9f74ec0
](9f74ec0adb
))
* Add alias for remove-app: rm, remove ([6890d98
](6890d98847
))
* Add custom workers in Procfile ([#1201 ](https://github.com/frappe/bench/issues/1201 )) ([593b80e
](593b80eec9
))
* add no-git option to new-app command ([2a25a6d
](2a25a6d2d9
))
* added option to provide custom queues ([e12f53d
](e12f53d1a5
))
* Aliased Commands ([b75d352
](b75d352454
))
* App Meta Base Class ([ce00798
](ce00798b5d
))
* bench drop {bench_path} ([906ad5a
](906ad5a099
))
* Dynamic Output rendering ([f117959
](f117959801
))
* Initialize bench on bench get(-app) if not created ([38382b8
](38382b84fb
))
* **minor:** --install-app option in init ([8480eb5
](8480eb5df7
))
* **minor:** Any procman in bench start ([bae338a
](bae338ad0b
))
* **minor:** App Meta handling on disk repos ([1865eee
](1865eeeb6d
))
* **minor:** Bench.python property that points to env python ([d63a988
](d63a9883e0
))
* New methods in Bench class ([53e811f
](53e811fe0a
))
* New methods in the App Class ([54f9741
](54f9741385
))
* Pass --use-feature='dynamic-feed' for new CLI ([b92fb14
](b92fb1401b
))
* Restart process manager for develop mode ([6123cd5
](6123cd5b49
))
* Skip warnings if envvar BENCH_DEVELOPER set ([20560c9
](20560c97c4
))
### Performance Improvements
* Cache Bench and App instantiation ([cd1f526
](cd1f526d09
))
2021-12-01 19:02:44 +00:00
gavin
5dc691a4f5
Merge pull request #1220 from frappe/staging
...
chore: Merge staging into v5.x
2021-12-02 00:27:24 +05:30
Gavin D'souza
e2858cb223
Merge branch 'develop' into staging
2021-12-01 17:18:16 +05:30
phot0n
2a25a6d2d9
feat: add no-git option to new-app command
2021-12-01 00:00:18 +05:30
Gavin D'souza
382ce2ce78
Merge branch 'develop' into staging
2021-11-30 17:48:48 +05:30
Gavin D'souza
b11f5b0f96
fix: Check if archived_sites directory exists before running
2021-11-30 17:46:56 +05:30
Gavin D'souza
05d824e905
Merge branch 'develop' into staging
2021-11-30 15:48:15 +05:30
Gavin D'souza
357fcc0bbd
fix: Trailing slash not setting app name properly
...
Re-do of https://github.com/frappe/bench/pull/1021 , somewhat
2021-11-30 11:33:02 +05:30
Gavin D'souza
a17af670df
style: Black-ish make & app
2021-11-29 18:57:40 +05:30
Gavin D'souza
8275d678f4
fix: Pass skip_assets
while resolving dependant apps
2021-11-29 18:55:47 +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
877e812fbb
fix: Patch to move archived_sites to archived/sites
...
This patch runs only if Frappe >= v14. Doesn't do anything else
Frappe PR: https://github.com/frappe/frappe/pull/15060
2021-11-26 18:53:13 +05:30
Gavin D'souza
b7994e21b1
fix: Show warning while using experimental features
...
This shows a "WARNING:..." whenever any --use-feature flag is used
2021-11-26 16:28:18 +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
6081690d7b
refactor(minor): python packages setup
2021-11-26 12:47:29 +05:30
Gavin D'souza
d63a9883e0
feat(minor): Bench.python property that points to env python
2021-11-26 11:54:32 +05:30
Gavin D'souza
27128c7c18
fix: Import bench.cli
...
For whatever reason, Travis complained saying "AttributeError: module 'bench' has no attribute 'cli'" but works fine locally :')
2021-11-18 19:02:22 +05:30
Gavin D'souza
a8564f3991
chore: Mark methods under job/step
2021-11-18 18:26:48 +05:30
Gavin D'souza
7c653db703
refactor: CLI entry point
...
* Optimized condiitonal checks
* Removed warnings for src, --version
* Handled positional shifts due to usages of --use-feature (by
set.intersection)
* Raise Exception always instead of hiding the traceback
2021-11-18 18:26:39 +05:30
Gavin D'souza
225fce5be6
fix: Show bench init job via bench get-app (conditional)
...
This happens when dynamic-feed is enabled
2021-11-18 18:13:14 +05:30
Gavin D'souza
f230778972
refactor: CLI Rendering Engine
...
* Hanlde job-step renders
* Use context manager for managing renders and state
* Job and Step remain process agnostic - neither are dependant on the
other
2021-11-18 18:10:01 +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
f117959801
feat: Dynamic Output rendering
...
Each operation can be broken down to multiple jobs. For instance, the
update operation can be broken down into: setting up bench dirs, env,
backups, requirements, etc.
Each step has a lot of output since Frappe requires a lot of complex
stuff to be done as a pre-requisite. Bench tries to simplify a lot in a
single command. Once, a step is completed, it's output is not really
required. So, we can ignore it to reduce the noise.
Here's where the `bench.cli.fancy` variable kicks in. Along with the
refactored log and new step wrapper, it makes the above thing possible.
At this point, there's no way to set this var from the end user...given
I'm still developing this. In the later commits, the idea is to pass a
flag similar to pip's --use-feature flag.
2021-11-18 01:00:04 +05:30
Gavin D'souza
3995b9237b
fix: raise (by default) when exec_cmd fails
2021-11-18 00:41:37 +05:30
Gavin D'souza
cd1f526d09
perf: Cache Bench and App instantiation
2021-11-18 00:39:48 +05:30
Gavin D'souza
ac07d8dc52
refactor: bench.utils.log
...
Maintain `bench.LOG_BUFFER` for entire process when `bench.cli.fancy` is set
2021-11-18 00:36:13 +05:30
Gavin D'souza
747be65f92
refactor(minor): switch branch
...
* Don't update node packages twice (already managed via
update_requirements)
* Don't reload bench.utils - this made sense back when bench was updated
along with the apps
* Fix utils namespaces. Import instead of ....
2021-11-18 00:31:51 +05:30
Gavin D'souza
58e3d4931b
refactor: bench update workflow
...
* Separate out branch validation logic
* Add type hints
* Raise named Exception "CannotUpdateReleaseBench" instead of SystemExit
* Use "newer" APIs wherever possible
2021-11-18 00:18:10 +05:30
Gavin D'souza
4655f6e785
refactor(minor): Dependency resolving
...
* Added a requirements method under BenchSetup
* Resolve Frappe dependencies prior to other apps
* Fixed issues with missing path in update_env_pip
2021-11-18 00:10:25 +05:30
Gavin D'souza
84d1b209ba
chore: Added Typing + styling
2021-11-18 00:03:42 +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
a192240cec
fix: Check if app is installed in env via initialize_apps
...
Consequence: Bench.apps only will have valid frappe apps that are installed in env
2021-11-17 23:51:28 +05:30
Gavin D'souza
67e5db6979
chore: Drop dead code
...
bench.prepare_staging module wasn't being utilized from any internal
APIs. Dropped it ;)
2021-11-17 23:49:11 +05:30
Gavin D'souza
b6fc562b48
refactor: get_app flow
...
* Changes in get_app fix path/cwd issues and order of resolving deps: py
-> dev py -> yarn
* Pass verbosity in setup_app_dependencies via get_app
* Say hi to new utils: get_available_folder_name, get_traceback
2021-11-17 23:45:30 +05:30
Gavin D'souza
4ba5422b65
fix: Move logging to lower level App.get API
2021-11-15 12:40:20 +05:30
Gavin D'souza
13ed9beca5
fix: frappe app can exist without public folder
...
other change:
* sync apps.txt manually after dep apps are also setup; right before
build step
2021-11-15 12:39:33 +05:30
Gavin D'souza
5170048d6d
style: Black-ish app.py for readability
2021-11-15 12:37:43 +05:30
Gavin D'souza
68c0549c18
refactor(get_app): Workflow for clones/install
2021-11-15 12:37:03 +05:30
Gavin D'souza
79980c3c55
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
2021-11-13 14:54:08 +05:30
Gavin D'souza
c636c7c133
fix: Use test frappe app - frappe_docs instead of wiki or chat
2021-11-13 14:27:45 +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
e074a1d886
fix: Show traceback in dev mode and set exit code on errors
2021-11-13 14:26:37 +05:30
Gavin D'souza
6123cd5b49
feat: Restart process manager for develop mode
2021-11-13 14:24:39 +05:30
Gavin D'souza
3709682231
fix: Handle collisions while moving apps
2021-11-13 14:23:49 +05:30
Gavin D'souza
17edb4797b
fix: Don't fetch meta for rm app
2021-11-13 14:23:08 +05:30
Gavin D'souza
1330e66d07
style: Flake8 + Black-ish
...
Tried styling and following standards over teh following modules:
* bench.app
* bench.bench
* bench.exceptions
* bench.utils
2021-11-13 03:01:55 +05:30
Gavin D'souza
d2fba5fe52
fix: Cleanup import hell (contd)
2021-11-13 02:53:32 +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
fafb29477c
test: Use frappe/chat as the test install app
2021-11-13 00:24:32 +05:30
Gavin D'souza
c4b8391716
fix: Raise and handle Exception class
...
* Instead of sys.exit, raise ValidationError
* Let's not handle BaseException, just Exception
* Use ValidationError instead of invalid syntax raise str
2021-11-13 00:20:05 +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
Gavin D'souza
71d178dde9
fix: sync apps file in init, imports and no warn in CI
2021-11-12 20:31:25 +05:30
Gavin D'souza
ee6a967a20
fix: import path for util
2021-11-12 18:56:24 +05:30
Gavin D'souza
89fdd1c5ac
chore: Deprecate bench setup socketio
2021-11-12 18:18:21 +05:30
Gavin D'souza
e1ed4d4e53
refactor(minor): Use Bench object to remove app
2021-11-12 18:17:49 +05:30
Gavin D'souza
bae338ad0b
feat(minor): Any procman in bench start
...
Using the `-m` flag, we can use any process manager instead of the
standard honcho. For instance, you've installed overmind on your machine
and are married to it, just run `bench start -m overmind` :P
2021-11-12 18:15:51 +05:30
Gavin D'souza
d04c7feab7
refactor(minor): bench init
...
Rename --frappe-branch flag to --version, both are allowed though. Cause
of rename: Makes more sense as version rather than frappe_branch. This
is because you can pass any git reference instead of just branches, including
version tags.
2021-11-12 18:13:01 +05:30
Gavin D'souza
53e811fe0a
feat: New methods in Bench class
...
New methods added in Bench class:
* excluded_apps property
* shallow_clone property
* apps property - check if frappe app & sort
* sync: Sync the apps.txt file from the installed set of Frappe apps
* build: Build bench assets
* reload: Reload the Frappe processes - supervisor restart
New methods added in BenchApps class:
* add/append: Adding an App object to this, installs the app on the
Bench
* remove: Removing an App from here, uninstalls and archives the app
2021-11-12 18:09:35 +05:30
Gavin D'souza
54f9741385
feat: New methods in the App Class
...
Methods available in the App class:
* get: Clone remote/local repos into set bench
* remove: Uninstall from env & move app into `archived/apps` folder.
Changed location from `archived_apps`
* install: Install app's Frappe, Python & Node dependencies on set bench
* uninstall: Uninstall Python package of the Frappe App. Does nothing
else...just a `pip uninstall`
2021-11-12 17:58:24 +05:30
Gavin D'souza
1f11cf4847
chore: Use newer import paths
...
* Although the utils refactor was done in such a way that there was no
need of changing import paths, a cleanup was due.
* Got rid of duplicated utils
* Remove unused imports
2021-11-12 17:57:03 +05:30
Gavin D'souza
c32616d0f2
refactor(utils): Re-arrange, clean-up
...
* Cleaner APIs - got rid of redundant and repeated checks
* Easier understanding on what's called where? ;) hopefully
* Separation of utils to avoid confusion
* Remove redundant utils
* Use newer standard library APIs
2021-11-12 17:51:20 +05:30
Gavin D'souza
5c9ac457dd
chore: Drop unused setup_env util
...
This util was dropped in favour of Bench(path).setup.env()
2021-10-30 02:46:18 +05:30
Gavin D'souza
93e5655570
refactor: bench.utils.exec_cmd
...
Refactoring the official way to run any commands through bench. Added a
way to pass on envvars, and use the new log API w click ;)
2021-10-30 02:44:00 +05:30
Gavin D'souza
ba289fba25
refactor(log): use click to colour everything
...
A year (longer) ago, I added color to bench manually. I hadn't explored
much of click back then. Had to figure out when we had to and we didnt
have to colour stuff. At times the chars would just be ignored and
rather printed to the terminal which was awkward...anyway, here,
goodbyetoallthat :cheers: (hopefully)
2021-10-30 02:40:29 +05:30
Gavin D'souza
20560c97c4
feat: Skip warnings if envvar BENCH_DEVELOPER set
2021-10-30 02:39:14 +05:30
Gavin D'souza
616dff8fbb
fix: Drop support for Frappe v4-5-6 ;)
...
This was long time due. Removing software that won't be compatible with
this version of Bench is a no-brainer. Sorry for not posting this in
advance but the world has been moving too fast.
Use `pip install frappe-bench --only-binary='all'` to install the latest
supported version for your machine :D
2021-10-30 02:35:32 +05:30
Gavin D'souza
984959beb8
refactor: Adoption of new style Bench notations
...
* Updated multiple functions
* Updated flow & re-ordered steps of `bench init` - tested with multiple
args
* Updated exceptions
2021-10-30 02:32:04 +05:30
Gavin D'souza
153546afd7
refactor: Simplify Bench with OOP
...
Goals:
- Commonify bench operations in a way that intuitive
- Get rid of the multiple duplicate functions because it's so hard to
understand flow in the codebase ;)
- Eliminate the need to guess, re-guess and pass bench info in each
function that needs to do literally anything
- Increase my happiness index because I just realised that I'm the top
contributor of this project and I'd like to make it my own.
- Adopt the principles of Least Surprise & The Principle of The Bigger Smile (of DHH) [inspired by ruby & ror]
Changes:
- The bench module has Bench and the action classes that can be accessed
through the bench object
- Used the Bench class to access properties like sites, apps & run (to execute commands in context) to reduce effort and clutter
- Style improvements & minor changes included
2021-10-30 02:25:38 +05:30
Gavin D'souza
b59379c5a9
refactor(minor): AppMeta class
...
* Fix tuple addition
* Rename App to AppMeta - it's more apt given how Bench classes are
being structured now
2021-10-30 02:06:10 +05:30
Gavin D'souza
c5a38b3647
refactor: Exceptions, Setup & Styles
2021-10-21 16:37:49 +05:30
gavin
8d5f408204
Merge branch 'develop' into get-app-on-steroids
2021-10-20 21:38:52 +05:30
Gavin D'souza
c060ce7b54
refactor(minor): bench install-app
...
Getting rid of the dependency on the manual coloring of all prints using
color
2021-10-20 19:43:10 +05:30
Gavin D'souza
dafddaef6d
refactor: bench get-app
...
* Added app dependencies resolving using `required_apps`
* Simplified workflow + docstring to explain what's goin on xD
* Get rid of redundant restart_bench kwarg from get_app
2021-10-20 19:42:52 +05:30
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
b75d352454
feat: Aliased Commands
...
* Added alias for get-app as get
* Now run `bench get erpnext` to install ERPNext on your bench
2021-10-20 00:45:05 +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
Pruthvi Patel
a28a0d0d23
fix: correct patches.txt
2021-10-18 18:21:24 +05:30
Pruthvi Patel
9f74ec0adb
feat: add live_reload
to default_config
2021-10-18 16:29:05 +05:30
Francisco Roldán
593b80eec9
feat: Add custom workers in Procfile ( #1201 )
...
* feat: updated procfile
* fix: add missing context
* fix: add missing context
2021-10-07 12:20: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
Francisco Roldán
e0b9461d41
Merge branch 'develop' into queues
2021-09-14 08:43:31 -03:00
Francisco Roldan
75f84625ad
fix: rename key
2021-09-14 08:42:06 -03:00
semantic-release-bot
ff2f01fb16
chore(release): Bumped to Version 5.6.0
...
# [5.6.0](https://github.com/frappe/bench/compare/v5.5.0...v5.6.0 ) (2021-09-13)
### Bug Fixes
* **command_cache:** Return iterable as fallback ([6fd3ad7
](6fd3ad738b
))
* Always set return code via cli ([552b935
](552b935f6b
))
* Hit command cache before fetching all commands ([a94ea19
](a94ea19bf4
))
* Return fallback list in cached_frappe_commands ([a015501
](a015501699
))
* set referrer-policy header in nginx config ([a4916d7
](a4916d7b89
))
### Features
* `bench setup requirements --dev` ([#1196 ](https://github.com/frappe/bench/issues/1196 )) ([b51f0ed
](b51f0ed2b2
))
* Set default version for easy install to v13 ([#1189 ](https://github.com/frappe/bench/issues/1189 )) ([6137086
](6137086e03
))
2021-09-13 15:28:21 +00:00
gavin
1f43d9b7d9
Merge pull request #1199 from frappe/staging
...
chore: Merge staging into v5.x
2021-09-13 20:57:32 +05:30
Gavin D'souza
9584b1ea9f
Merge branch 'develop' into staging
2021-09-13 20:56:27 +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
Gavin D'souza
9442511b83
Merge branch 'develop' into staging
2021-09-13 18:49:31 +05:30
Francisco Roldán
58ef0ac430
Merge branch 'develop' into queues
2021-09-09 08:56:34 -03:00
Gavin D'souza
6fd3ad738b
fix(command_cache): Return iterable as fallback
2021-09-09 16:05:42 +05:30
Gavin D'souza
b35af193d3
chore: Remove unnecessary returns, re-order cli resolution
...
Changes suggested by LGTM https://lgtm.com/projects/g/frappe/bench/rev/pr-560978725461013796d605b409ffc5c85c774829
2021-09-09 14:56:32 +05:30
Gavin D'souza
a015501699
fix: Return fallback list in cached_frappe_commands
2021-09-09 13:54:35 +05:30
Gavin D'souza
6160ff48ab
style: Black
2021-09-09 13:54:19 +05:30
Gavin D'souza
552b935f6b
fix: Always set return code via cli
2021-09-09 13:20:26 +05:30
Gavin D'souza
a94ea19bf4
fix: Hit command cache before fetching all commands
2021-09-09 13:19:44 +05:30
Francisco Roldan
e12f53d1a5
feat: added option to provide custom queues
2021-08-30 12:35:53 -03:00
gavin
beb14c8681
Merge branch 'develop' into referrer-policy
2021-08-30 12:38:59 +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
semantic-release-bot
6697727e68
chore(release): Bumped to Version 5.5.0
...
# [5.5.0](https://github.com/frappe/bench/compare/v5.4.1...v5.5.0 ) (2021-07-29)
### Bug Fixes
* ssl nginx directive deprecation ([a514a0e
](a514a0e97b
))
### Features
* Redis ACL config is added to conf templates ([46e6622
](46e66226c2
))
2021-07-29 09:21:50 +00:00
gavin
90e7cd4909
Merge pull request #1191 from frappe/staging
...
chore: Merge staging into v5.x
2021-07-29 14:51:00 +05:30
Gavin D'souza
b59919e410
Merge branch 'develop' into staging
2021-07-29 14:01:21 +05:30
leela
46e66226c2
feat: Redis ACL config is added to conf templates
2021-07-20 06:22:15 +05:30
Roberto Murguia
a514a0e97b
fix: ssl nginx directive deprecation
2021-06-15 09:35:04 -05:00
semantic-release-bot
410505f0e9
chore(release): Bumped to Version 5.4.1
...
## [5.4.1](https://github.com/frappe/bench/compare/v5.4.0...v5.4.1 ) (2021-05-17)
### Bug Fixes
* Added warning for unshallow without --reset ([01abc56
](01abc561e0
))
* Handle command execution failures ([dcdb15d
](dcdb15d471
))
* Remove PY2 compatibility code ([54d48f6
](54d48f61a3
))
* Revert print compatibility import ([753e36d
](753e36d433
))
* Show step titles while running operations ([096c2cf
](096c2cfe6b
))
* Unshallow clone if update without --reset ([4cadf2c
](4cadf2c719
))
### Performance Improvements
* Faster bench remove-app ([ebc3ceb
](ebc3cebd19
))
2021-05-17 06:13:50 +00:00
Gavin D'souza
973b8010be
chore: Bumped to Version 5.4.0
...
To match with current version on v5.x branch
2021-05-13 15:45:43 +05:30
Gavin D'souza
593ac8109d
Merge branch 'develop' of github.com:frappe/bench into staging
2021-05-13 15:40:34 +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
01abc561e0
fix: Added warning for unshallow without --reset
2021-05-10 17:35:31 +05:30
Gavin D'souza
f46126ce2b
chore: Remove deprecated option from config template
2021-05-10 14:51:52 +05:30
Gavin D'souza
096c2cfe6b
fix: Show step titles while running operations
2021-05-10 14:51:14 +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
dc924dd271
Merge branch 'v5.x' into staging
2021-04-27 12:52:34 +05:30
Gavin D'souza
ed3f2d28fb
fix: Remove set-default-site from CLI
2021-04-26 20:16:16 +05:30
Hussain Nagaria
324b58622c
chore: Remove set-default-site command
2021-04-26 17:06:30 +05:30
Gavin D'souza
64fbeee1e6
Revert "fix: Use execve and set envvars instead of execv"
...
This reverts commit 530a980ef7
.
2021-04-26 11:32:20 +05:30
Gavin D'souza
7e1db3fd74
test: Update env test
...
Env folder's include may be empty or non existent
2021-04-23 19:14:30 +05:30
Gavin D'souza
530a980ef7
fix: Use execve and set envvars instead of execv
...
Changed from execv to execve with empty env dict because bench commands on macOS 10.14.6 PY3.9.0a4 fails with "Error while finding module specification for 'frappe.utils.bench_helper' (ModuleNotFoundError: No module named 'frappe')"
This error has come up in the past too. I'm now suspecting it has
something to do with the current process passing on it's environment
variables to the process that's going to replace it, which causes these
issues.
Note that direct execution of the commands without the bench wrapper
worked fine although via bench failed with the specified error
2021-04-23 18:38:27 +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
405f41e434
test: Use frappe_theme to test apps instead of erpnext
...
* Don't skip assets
2021-04-23 11:25:29 +05:30
Gavin D'souza
f04a9e6e0d
chore: Remove deprecated command switch-to-master
2021-04-23 11:25:24 +05:30
Gavin D'souza
da85e0ccdd
refactor: Optimize and simplify imports
...
* make relative imports absolute
* minor: Simplify logic
2021-04-23 11:05:06 +05:30
Gavin D'souza
778fe6cb0b
fix: Don't break update if no sites exist on patching sites stage
2021-04-23 10:47:36 +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
cba3f7d8a4
Merge pull request #1147 from ankush/fix_compile
...
fix: use correct path for compiling py files
2021-04-21 11:53:10 +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
gavin
558006068f
Merge branch 'develop' into fix_compile
2021-04-19 18:15:49 +05:30
Sagar Vora
ec2ce0f3b8
chore: remove support for older versions of frappe
2021-04-13 13:06:08 +05:30
Ankush Menat
b3a0757e38
fix: use correct path for compiling py files
2021-04-02 19:48:04 +05:30
Mohammad Hasnain Mohsin Rajan
4c627e4531
chore: update version ( #1138 )
...
* chore: update version
* chore: use dev version on develop branch
* chore: move develop branch check before imports
2021-03-18 13:57:21 +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
Revant Nandgaonkar
f109c3eaad
Merge branch 'develop' into setup-supervisor-skip-redis
2021-03-02 13:08:34 +05:30
gavin
f3809b00ac
Merge pull request #1121 from NicolasStr/develop
...
fix: create bench folder in user directory
2021-02-26 19:22:09 +05:30
gavin
034e0085e9
Merge pull request #1124 from adityahase/perf-cli
...
perf: Faster CLI
2021-02-26 16:39:01 +05:30
Revant Nandgaonkar
5cf1363481
feat: skip redis config during supervisor setup
2021-02-26 07:55:04 +05:30
Aditya Hase
b70aa21a73
chore: Remove unused import comment blocks
2021-02-21 11:24:32 +05:30
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
6706b230da
perf: Remove six.moves.urllib from the import tree
2021-02-21 11:10:43 +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
cab2d44df5
perf: Remove bench.config.letsencrypt from the import tree
2021-02-21 10:06:11 +05:30
Aditya Hase
36e48c7dd7
perf: Remove bench.config.nginx from the import tree
2021-02-21 10:05:40 +05:30
Aditya Hase
5525548ced
perf: Remove six.moves.urllib from the import tree
2021-02-21 10:04:03 +05:30
Aditya Hase
e12717d63a
perf: Remove crontab from the import tree
2021-02-21 10:03:36 +05:30
Aditya Hase
6c0e1a359e
perf: Remove siz.moves.configparser from the import tree
2021-02-21 10:03:03 +05:30
Aditya Hase
8527b106c3
perf: Remove multiprocessing from the import tree
2021-02-21 10:02:41 +05:30
Aditya Hase
104efd349b
perf: Remove ast from the import tree
2021-02-21 10:02:20 +05:30
Aditya Hase
2a4377ac6f
perf: Remove crontab from the import tree
2021-02-21 10:02:02 +05:30
Aditya Hase
ad37665e8b
perf: Remove multiprocessing from the import tree
2021-02-21 10:01:44 +05:30
Aditya Hase
ad90d9485f
perf: Remove Jinja and PackageLoader from the import tree
2021-02-20 13:52:39 +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
DANY ROBERT
fec8921214
fix: fail2ban help message
2021-02-18 11:31:38 +05:30
Nicolas Streng
5c5d2b57df
fix: create bench folder in user directory
2021-02-16 16:45:07 +01:00
Ankush Menat
bc21abb095
Merge branch 'develop' into branch_help_command
2021-02-09 11:09:10 +05:30
Ankush Menat
7e171967b3
docs: Update help message for --frappe-branch
2021-02-09 11:06:04 +05:30
semantic-release-bot
9a069246f2
chore(release): Bumped to Version 5.3.0
...
# [5.3.0](https://github.com/frappe/bench/compare/v5.2.1...v5.3.0 ) (2021-02-04)
### Bug Fixes
* Run compileall in bench after update ([54e6bcf
](54e6bcfe9c
))
* wrong flag description ([e9c046d
](e9c046d56b
))
* **install:** Allow override of frappe_branch and erpnext_branch ([6a207ca
](6a207ca57a
))
* **install:** Helpful logging ([2c4659a
](2c4659a7aa
))
* **playbooks:** Support wkhtmltox arm64 architecture ([d6d1b91
](d6d1b91a79
))
* Allow bench src as root ([9d1f7a7
](9d1f7a7ed7
))
* force renew on monthly bases ([7dcd5f9
](7dcd5f9ce3
))
* Handle no args passed in CLI ([31e4aee
](31e4aeeab8
))
* Install wheel during ansible setup ([61567be
](61567be3f6
))
* Log in ~/bench.log if not running inside bench directory ([28302f6
](28302f67a3
))
* removed force renewal as it would extend by 3 months every month, now the job runs daily ([408676c
](408676c80e
))
* removed patch ([87edc4e
](87edc4e109
))
* Use NullHandler for commands executed outside a bench dir ([31f2999
](31f2999b4b
))
* utf8mb4_general_ci ([f2e7702
](f2e7702fde
))
* **install:** Install dev packages for Arm 64-bit ([df0562d
](df0562d59b
))
* **install:** Obey --without-site ([608b28c
](608b28c246
))
* Add bench.cli namespace ([2f0b508
](2f0b508d2e
))
* Remove src test ([b8ed4f6
](b8ed4f6a4b
))
* Unpin setuptools, six and virtualenv ([03576d1
](03576d10b4
))
* update letsencrypt renew cron frequency ([7a7b0fe
](7a7b0fea37
))
* Update package lists and setup prereqs before setting up script ([550f55d
](550f55d146
))
* Updated command help and verbosity while setting crontab ([c9abac2
](c9abac299a
))
* Use 'develop' bench if not specified! ([0ad4421
](0ad44214cf
))
* warning on pip reinstall ([d979751
](d979751e0c
))
### Features
* better flag description ([9de383a
](9de383a760
))
* patch for older setups with wrong cron format ([1e97cdf
](1e97cdf0c8
))
* patch for older setups with wrong cron format ([097879e
](097879e1fb
))
* pitch erpnext support to VM users ([137a78a
](137a78a6b0
))
2021-02-04 10:26:17 +00:00
Raffael Meyer
7f9bed4c8e
fix: nginx proxy buffer
2021-01-25 19:36:56 +01:00
Samuel Danieli
9de383a760
feat: better flag description
...
Co-authored-by: gavin <gavin18d@gmail.com>
2020-12-02 12:01:25 +01:00
Samuel Danieli
e9c046d56b
fix: wrong flag description
2020-12-01 16:04:57 +01:00
gavin
e16824f23e
Merge pull request #1094 from gavindsouza/compileall-here
...
fix: Run compileall in bench after update
2020-11-09 10:47:35 +05:30
Gavin D'souza
54e6bcfe9c
fix: Run compileall in bench after update
2020-10-30 19:52:43 +05:30
Hendy Irawan
6ef6e37b80
style: Apply suggestions from code review
...
Co-authored-by: gavin <gavin18d@gmail.com>
2020-10-30 11:02:45 +00:00
Hendy Irawan
d6d1b91a79
fix(playbooks): Support wkhtmltox arm64 architecture
...
For Ubuntu 20.04 LTS and later
2020-10-30 11:02:45 +00:00
gavin
de14fc6f1c
Merge pull request #1087 from ceefour/patch-without-site
...
fix(install): Obey --without-site
2020-10-28 12:41:46 +05:30
gavin
c9155cba1e
Merge branch 'develop' into patch-without-site
2020-10-28 12:14:23 +05:30