mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 09:02:10 +00:00
[Minor] Added '--version' option to bench command
This commit is contained in:
parent
d09d448360
commit
22de7e33db
@ -1,8 +1,18 @@
|
||||
import click
|
||||
|
||||
def print_bench_version(ctx, param, value):
|
||||
"""Prints current bench version"""
|
||||
if not value or ctx.resilient_parsing:
|
||||
return
|
||||
|
||||
import bench
|
||||
click.echo(bench.__version__)
|
||||
ctx.exit()
|
||||
|
||||
@click.group()
|
||||
@click.option('--version', is_flag=True, is_eager=True, callback=print_bench_version, expose_value=False)
|
||||
def bench_command(bench_path='.'):
|
||||
"Bench manager for Frappe"
|
||||
"""Bench manager for Frappe"""
|
||||
import bench
|
||||
from bench.app import get_current_frappe_version
|
||||
from bench.utils import setup_logging
|
||||
|
Loading…
Reference in New Issue
Block a user