mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 17:24:41 +00:00
Merge pull request #254 from shreyasp/bench-version
[Minor] Added '--version' option to bench command
This commit is contained in:
commit
62d20c9699
@ -1,8 +1,18 @@
|
|||||||
import click
|
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.group()
|
||||||
|
@click.option('--version', is_flag=True, is_eager=True, callback=print_bench_version, expose_value=False)
|
||||||
def bench_command(bench_path='.'):
|
def bench_command(bench_path='.'):
|
||||||
"Bench manager for Frappe"
|
"""Bench manager for Frappe"""
|
||||||
import bench
|
import bench
|
||||||
from bench.app import get_current_frappe_version
|
from bench.app import get_current_frappe_version
|
||||||
from bench.utils import setup_logging
|
from bench.utils import setup_logging
|
||||||
|
Loading…
Reference in New Issue
Block a user