]> granicus.if.org Git - graphviz/commitdiff
Add --collection option
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Fri, 14 Aug 2020 09:58:18 +0000 (11:58 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Fri, 14 Aug 2020 15:23:28 +0000 (17:23 +0200)
gen_version.py

index 35679bfb8cb2790ef22eed3c8eb993022b0616fa..bc4c11d96570c095a7bf475055ac358aacf87d02 100644 (file)
@@ -48,6 +48,11 @@ parser.add_argument('--committer-date-graphviz',
                     help='Print graphviz special formatted committer date in UTC '
                     'instead of version'
 )
+parser.add_argument('--collection',
+                    action='store_true',
+                    help='Print collection ("stable" or "development") '
+                    'instead of version'
+)
 
 args = parser.parse_args()
 
@@ -87,6 +92,8 @@ if not patch_version.isnumeric() or args.date_format:
 
 if args.date_format:
     print(committer_date)
+elif args.collection:
+    print(collection)
 else:
     if not patch_version.isnumeric():
         # Non-numerical patch version; add committer date