2
0
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:
shreyas 2016-07-05 17:14:06 +05:30
parent d09d448360
commit 22de7e33db

View File

@ -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