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
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
* Add long description using README.md
* Add project URLs. This will brighten up
https://pypi.org/project/frappe-bench/ a bit
* Update contact, license info, etc
* Add project classifiers
* 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
* Hanlde job-step renders
* Use context manager for managing renders and state
* Job and Step remain process agnostic - neither are dependant on the
other
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.
* 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 ....
* Separate out branch validation logic
* Add type hints
* Raise named Exception "CannotUpdateReleaseBench" instead of SystemExit
* Use "newer" APIs wherever possible