Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use setup scm #194

Merged
merged 3 commits into from
Nov 25, 2024
Merged

Use setup scm #194

merged 3 commits into from
Nov 25, 2024

Conversation

amjith
Copy link
Member

@amjith amjith commented Nov 25, 2024

Description

Use setuptools-scm to read the version from git tags.

Checklist

  • I've added this contribution to the CHANGELOG.md file.

@amjith amjith merged commit 70e2151 into main Nov 25, 2024
7 checks passed
@amjith amjith deleted the use-setup-scm branch November 25, 2024 02:30
@click.command()
@click.option("-V", "--version", is_flag=True, help="Output litecli's version.")
@click.option("-V", "--version", callback=version_callback, expose_value=False, is_eager=True, is_flag=True, help="Show version.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@click.version_option() will probably do what you want. It uses importlib and assumes that the top-level name is your project name.

Impl at https://github.com/pallets/click/blob/fde47b4b4f978f179b9dff34583cb2b99021f482/src/click/decorators.py#L422

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants