From: JinWang An Date: Mon, 28 Dec 2020 04:47:12 +0000 (+0900) Subject: Imported Upstream version 5.4.0 X-Git-Tag: upstream/5.4.0^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8c32d8f835f8516b1eef3de1318b6564be0d63d9;p=platform%2Fupstream%2Fpython3-pbr.git Imported Upstream version 5.4.0 --- diff --git a/ChangeLog b/ChangeLog index 164fc71..22839a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ CHANGES ======= +5.4.0 +----- + +* option to print only the version of a package + 5.3.1 ----- diff --git a/PKG-INFO b/PKG-INFO index 90bf15e..4a47168 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pbr -Version: 5.3.1 +Version: 5.4.0 Summary: Python Build Reasonableness Home-page: https://docs.openstack.org/pbr/latest/ Author: OpenStack diff --git a/pbr.egg-info/PKG-INFO b/pbr.egg-info/PKG-INFO index 90bf15e..4a47168 100644 --- a/pbr.egg-info/PKG-INFO +++ b/pbr.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pbr -Version: 5.3.1 +Version: 5.4.0 Summary: Python Build Reasonableness Home-page: https://docs.openstack.org/pbr/latest/ Author: OpenStack diff --git a/pbr.egg-info/SOURCES.txt b/pbr.egg-info/SOURCES.txt index d673797..97f7167 100644 --- a/pbr.egg-info/SOURCES.txt +++ b/pbr.egg-info/SOURCES.txt @@ -92,6 +92,7 @@ playbooks/legacy/pbr-installation-devstack/post.yaml playbooks/legacy/pbr-installation-devstack/run.yaml playbooks/legacy/pbr-installation-upstream-devstack/post.yaml playbooks/legacy/pbr-installation-upstream-devstack/run.yaml +releasenotes/notes/cmd-e6664dcbd42d3935.yaml releasenotes/notes/deprecate-pyN-requirements-364655c38fa5b780.yaml releasenotes/notes/deprecate-testr-nose-integration-56e3e11248d946fc.yaml releasenotes/notes/fix-global-replace-of-src-prefix-in-glob-eb850b94ca96993e.yaml diff --git a/pbr/cmd/main.py b/pbr/cmd/main.py index 91ea384..162304f 100644 --- a/pbr/cmd/main.py +++ b/pbr/cmd/main.py @@ -40,8 +40,11 @@ def get_sha(args): def get_info(args): - print("{name}\t{version}\t{released}\t{sha}".format( - **_get_info(args.name))) + if args.short: + print("{version}".format(**_get_info(args.name))) + else: + print("{name}\t{version}\t{released}\t{sha}".format( + **_get_info(args.name))) def _get_info(name): @@ -98,6 +101,8 @@ def main(): 'info', help='print version info for package') cmd_info.set_defaults(func=get_info) cmd_info.add_argument('name', help='package to print info of') + cmd_info.add_argument('-s', '--short', action="store_true", + help='only display package version') cmd_freeze = subparsers.add_parser( 'freeze', help='print version info for all installed packages') diff --git a/releasenotes/notes/cmd-e6664dcbd42d3935.yaml b/releasenotes/notes/cmd-e6664dcbd42d3935.yaml new file mode 100644 index 0000000..c5cf096 --- /dev/null +++ b/releasenotes/notes/cmd-e6664dcbd42d3935.yaml @@ -0,0 +1,11 @@ +--- +features: + - | + Add an option to print only the version of a package + + Example: + + .. code-block:: bash + + $ pbr info -s pkgname + 1.2.3