font-patcher: Show script version on run

[why]
We show only the Release version of the patcher script. Often it is
unclear which particular script people are using.

[how]
Also show the script version. This is a bit frickle, as it needs
developers to change the number manually (as with all other scripts in
the project that have a script version), but so be it.

This could be replaced by the 'current' git hash. But that has the
drawback that one needs to search for the commit to see how old the
script is.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2022-08-23 17:36:16 +02:00
parent 7b81d7c84a
commit aa48eea360

View file

@ -1,10 +1,13 @@
#!/usr/bin/env python
# coding=utf8
# Nerd Fonts Version: 2.1.0
# script version: 3.0.1
# Script version is further down
from __future__ import absolute_import, print_function, unicode_literals
# Change the script version when you edit this script:
script_version = "3.0.2"
version = "2.1.0"
projectName = "Nerd Fonts"
projectNameAbbreviation = "NF"
@ -196,7 +199,7 @@ class font_patcher:
def patch(self):
print("{} Patcher v{} executing\n".format(projectName, version))
print("{} Patcher v{} ({}) executing\n".format(projectName, version, script_version))
if self.args.single:
# Force width to be equal on all glyphs to ensure the font is considered monospaced on Windows.