From: Matthew Fernandez Date: Sun, 21 Feb 2021 04:38:49 +0000 (-0800) Subject: move patch version adjustment earlier in version script X-Git-Tag: 2.47.0~36^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e01603063fa6cfbf1e5d8d7be1cdb2fd88a0bae4;p=graphviz move patch version adjustment earlier in version script 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. --- diff --git a/gen_version.py b/gen_version.py index 25f403704..5e7d27ce1 100644 --- a/gen_version.py +++ b/gen_version.py @@ -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))