Imported Upstream version 5.4.0 upstream/5.4.0
authorJinWang An <jinwang.an@samsung.com>
Mon, 28 Dec 2020 04:47:12 +0000 (13:47 +0900)
committerJinWang An <jinwang.an@samsung.com>
Mon, 28 Dec 2020 04:47:12 +0000 (13:47 +0900)
ChangeLog
PKG-INFO
pbr.egg-info/PKG-INFO
pbr.egg-info/SOURCES.txt
pbr/cmd/main.py
releasenotes/notes/cmd-e6664dcbd42d3935.yaml [new file with mode: 0644]

index 164fc71f53ab29018cd761659f6c2411bf1ec398..22839a7c80832c3876663fc0d2162a2f9749758c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
 CHANGES
 =======
 
+5.4.0
+-----
+
+* option to print only the version of a package
+
 5.3.1
 -----
 
index 90bf15e37c28a66916023148098fc2c83a3355c5..4a47168fe033ab61f8350c0888183339f321e71c 100644 (file)
--- 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
index 90bf15e37c28a66916023148098fc2c83a3355c5..4a47168fe033ab61f8350c0888183339f321e71c 100644 (file)
@@ -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
index d6737974cba8cd80ed59b601baff229819446153..97f71670c74d5078ea3c8d912b7a18ae2e6331ef 100644 (file)
@@ -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
index 91ea384eadc74342c1a7b9a2ea32035fda84a09c..162304f7e1a4f34a5e27ab8a3d85e793d88d379b 100644 (file)
@@ -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 (file)
index 0000000..c5cf096
--- /dev/null
@@ -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