diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-04-19 13:55:12 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-04-19 14:02:02 +0200 |
commit | e6408637699f6cae91fc1505926ce7eca4f414ca (patch) | |
tree | 89ca14b159ef5e541dc5a05c11615e305ae1ff13 | |
parent | 2938a9d10e5464132b51cc95cf0e9d3ee38c01fd (diff) | |
download | hydrilla-builder-e6408637699f6cae91fc1505926ce7eca4f414ca.tar.gz hydrilla-builder-e6408637699f6cae91fc1505926ce7eca4f414ca.zip |
add support for --version option
-rw-r--r-- | src/hydrilla/builder/build.py | 3 | ||||
-rw-r--r-- | src/hydrilla/builder/locales/en_US/LC_MESSAGES/hydrilla-messages.po | 37 |
2 files changed, 29 insertions, 11 deletions
diff --git a/src/hydrilla/builder/build.py b/src/hydrilla/builder/build.py index 8e78764..5d5bbf8 100644 --- a/src/hydrilla/builder/build.py +++ b/src/hydrilla/builder/build.py @@ -404,6 +404,9 @@ dir_type = click.Path(exists=True, file_okay=False, resolve_path=True) help=_('path_instead_of_index_json')) @click.option('-d', '--dstdir', type=dir_type, required=True, help=_('built_package_files_destination')) +@click.version_option(version=_version.version, prog_name='Hydrilla builder', + message=_('%(prog)s_%(version)s_license'), + help=_('version_printing')) def perform(srcdir, index_json, dstdir): """<this will be replaced by a localized docstring for Click to pick up>""" build = Build(Path(srcdir), Path(index_json)) diff --git a/src/hydrilla/builder/locales/en_US/LC_MESSAGES/hydrilla-messages.po b/src/hydrilla/builder/locales/en_US/LC_MESSAGES/hydrilla-messages.po index 8c08413..e3ab525 100644 --- a/src/hydrilla/builder/locales/en_US/LC_MESSAGES/hydrilla-messages.po +++ b/src/hydrilla/builder/locales/en_US/LC_MESSAGES/hydrilla-messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: hydrilla.builder 0.1.dev16+g4e46d7f.d20220211\n" "Report-Msgid-Bugs-To: koszko@koszko.org\n" -"POT-Creation-Date: 2022-02-12 14:40+0100\n" +"POT-Creation-Date: 2022-04-19 13:51+0200\n" "PO-Revision-Date: 2022-02-12 00:00+0000\n" "Last-Translator: Wojtek Kosior <koszko@koszko.org>\n" "Language: en_US\n" @@ -18,51 +18,66 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.8.0\n" -#: src/hydrilla/builder/build.py:107 +#: src/hydrilla/builder/build.py:118 msgid "couldnt_import_reuse_is_it_installed" msgstr "" "Could not import 'reuse'. Is the tool installed and visible to this " "Python instance?" -#: src/hydrilla/builder/build.py:112 +#: src/hydrilla/builder/build.py:123 msgid "spdx_report_from_reuse_incompliant" msgstr "Attempt to generate an SPDX report for a REUSE-incompliant package." -#: src/hydrilla/builder/build.py:196 +#: src/hydrilla/builder/build.py:207 msgid "loading_{}_outside_package_dir" msgstr "Attempt to load '{}' which lies outside package source directory." -#: src/hydrilla/builder/build.py:200 +#: src/hydrilla/builder/build.py:211 msgid "loading_reserved_index_json" msgstr "Attempt to load 'index.json' which is a reserved filename." -#: src/hydrilla/builder/build.py:314 +#: src/hydrilla/builder/build.py:329 msgid "report_spdx_not_in_copyright_list" msgstr "" "Told to generate 'report.spdx' but 'report.spdx' is not listed among " "copyright files. Refusing to proceed." -#: src/hydrilla/builder/build.py:386 +#: src/hydrilla/builder/build.py:402 msgid "source_directory_to_build_from" msgstr "Source directory to build from." -#: src/hydrilla/builder/build.py:388 +#: src/hydrilla/builder/build.py:404 msgid "path_instead_of_index_json" msgstr "" "Path to file to be processed instead of index.json (if not absolute, " "resolved relative to srcdir)." -#: src/hydrilla/builder/build.py:390 +#: src/hydrilla/builder/build.py:406 msgid "built_package_files_destination" msgstr "Destination directory to write built package files to." -#: src/hydrilla/builder/build.py:396 +#: src/hydrilla/builder/build.py:408 +#, python-format +msgid "%(prog)s_%(version)s_license" +msgstr "" +"%(prog)s %(version)s\n" +"Copyright (C) 2021,2022 Wojtek Kosior and contributors.\n" +"License GPLv3+: GNU AGPL version 3 or later " +"<https://gnu.org/licenses/gpl.html>\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law." + +#: src/hydrilla/builder/build.py:409 +msgid "version_printing" +msgstr "Print version information and exit." + +#: src/hydrilla/builder/build.py:415 msgid "build_package_from_srcdir_to_dstdir" msgstr "" "Build Hydrilla package from `scrdir` and write the resulting files under " "`dstdir`." -#: src/hydrilla/util/_util.py:76 +#: src/hydrilla/util/_util.py:79 msgid "bad_comment" msgstr "bad comment" |