Skip to content

Commit

Permalink
Merge pull request #195 from dbcli/use-setup-scm
Browse files Browse the repository at this point in the history
Use setup scm
  • Loading branch information
amjith authored Nov 25, 2024
2 parents 70e2151 + e77b08f commit e239fb7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 1.13.1 - 2024-11-24
## 1.13.2 - 2024-11-24

### Internal

Expand Down
9 changes: 1 addition & 8 deletions litecli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,15 +825,8 @@ def get_last_query(self):
return self.query_history[-1][0] if self.query_history else None


def version_callback(ctx: click.Context, param: click.Parameter, value: bool) -> None:
if not value or ctx.resilient_parsing:
return
click.echo(f"Version: {__version__}", color=ctx.color)
ctx.exit()


@click.command()
@click.option("-V", "--version", callback=version_callback, expose_value=False, is_eager=True, is_flag=True, help="Show version.")
@click.version_option(__version__, "-V", "--version")
@click.option("-D", "--database", "dbname", help="Database to use.")
@click.option(
"-R",
Expand Down
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@ dependencies = [
]

[build-system]
requires = ["setuptools>=64.0", "setuptools-scm>=8"]
requires = [
"setuptools>=64.0",
"setuptools-scm>=8;python_version>='3.8'",
"setuptools-scm<8;python_version<'3.8'",
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]

[project.scripts]
litecli = "litecli.main:cli"

Expand Down

0 comments on commit e239fb7

Please sign in to comment.