]> granicus.if.org Git - graphviz/commitdiff
move patch version adjustment earlier in version script
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 21 Feb 2021 04:38:49 +0000 (20:38 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 27 Feb 2021 18:12:09 +0000 (10:12 -0800)
This has no relevant effect right now, but will be useful for upcoming changes
that need to see the updated patch version when branching on what to output.

gen_version.py

index 25f40370436acc368f875ae9488743622b4bc97f..5e7d27ce1966079e46839f696f7d52dd6b3ab972 100644 (file)
@@ -90,12 +90,13 @@ if not patch_version.isnumeric() or args.date_format:
         print('Warning: build not started in a Git clone, or Git is not installed: setting version date to 0.', file=sys.stderr)
         committer_date = '0'
 
+if not patch_version.isnumeric():
+    # Non-numerical patch version; add committer date
+    patch_version += '.' + committer_date
+
 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
-        patch_version += '.' + committer_date
     print('{0}.{1}.{2}'.format(major_version, minor_version, patch_version))