Skip to content

Commit

Permalink
add cli --version
Browse files Browse the repository at this point in the history
  • Loading branch information
long2ice committed May 19, 2020
1 parent 12ff10c commit 67d656e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ChangeLog
-----
- Fix transaction and fields import.
- Make unique index worked.
- Add cli --version.

0.1.3
-----
Expand Down
5 changes: 3 additions & 2 deletions aerich/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys
from configparser import ConfigParser
from enum import Enum

from . import __version__
import asyncclick as click
from asyncclick import Context, UsageError
from tortoise import ConfigurationError, Tortoise, generate_schema_for_client
Expand All @@ -23,6 +23,7 @@ class Color(str, Enum):


@click.group(context_settings={"help_option_names": ["-h", "--help"]})
@click.version_option(__version__)
@click.option(
"-c", "--config", default="aerich.ini", show_default=True, help="Config file.",
)
Expand Down Expand Up @@ -151,7 +152,7 @@ def history(ctx):
)
@click.pass_context
async def init(
ctx: Context, tortoise_orm, location,
ctx: Context, tortoise_orm, location,
):
config = ctx.obj["config"]
name = ctx.obj["name"]
Expand Down

0 comments on commit 67d656e

Please sign in to comment.