Skip to content

Commit 1d19ddd

Browse files
committed
chore: update copyright year
1 parent 5395f2d commit 1d19ddd

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
version-query
2-
Copyright (c) 2017-2023 Mateusz Bysiek https://mbdevpl.github.io/
2+
Copyright (c) 2017-2024 Mateusz Bysiek https://mbdevpl.github.io/
33
Copyright (c) 2020 John Vandenberg https://github.com/jayvdb
44

55
Licensed under the Apache License, Version 2.0 (the "License");

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
boilerplates[logging] ~= 1.0
1+
boilerplates[cli,logging] ~= 1.0
22
GitPython ~= 3.1
33
packaging >= 23.0
44
semver ~= 2.13

version_query/main.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
import argparse
44
import pathlib
5-
import sys
5+
6+
from boilerplates.cli import make_copyright_notice, add_version_option
67

78
from ._version import VERSION
89
from .version import VersionComponent
@@ -18,17 +19,17 @@ def main(args=None, namespace=None) -> None:
1819
prog='version_query',
1920
description='''Tool for querying current versions of Python packages. Use LOGGING_LEVEL
2021
environment variable to adjust logging level.''',
21-
epilog='''Copyright 2017-2023 by the contributors, Apache License 2.0,
22-
https://github.com/mbdevpl/version-query''',
22+
epilog=make_copyright_notice(
23+
2017, 2024, author='the contributors', url='https://github.com/mbdevpl/version-query'),
2324
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
25+
add_version_option(parser, VERSION)
26+
2427
parser.add_argument('-i', '--increment', action='store_true', help='''output version string for
2528
next patch release, i.e. if version is 1.0.3, output 1.0.4''')
2629
parser.add_argument('-p', '--predict', action='store_true', help='''operate in prediction mode,
2730
i.e. assume existence of git repository and infer current version from
2831
its tags, history and working tree status''')
2932
parser.add_argument('path', type=pathlib.Path)
30-
parser.add_argument('--version', action='version',
31-
version=f'{parser.prog} {VERSION},\nPython {sys.version}')
3233
parsed_args = parser.parse_args(args=args, namespace=namespace)
3334
if parsed_args.predict and parsed_args.increment:
3435
raise ValueError(

0 commit comments

Comments
 (0)