Add custom version for verilator --version packaging (#4954)

This commit is contained in:
Nolan Poe
2024-03-09 16:44:25 -05:00
committed by GitHub
parent 9a3aed57b1
commit 04512e5d04
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -136,6 +136,7 @@ Mostafa Gamal
Nandu Raj
Nathan Kohagen
Nathan Myers
Nolan Poe
Oleh Maksymenko
Patrick Stewart
Paul Swirhun
+5 -1
View File
@@ -22,7 +22,11 @@ Args = parser.parse_args()
os.chdir(Args.directory)
rev = 'UNKNOWN_REV'
if 'VERILATOR_SRC_VERSION' in os.environ:
rev = os.environ['VERILATOR_SRC_VERSION']
else:
rev = 'UNKNOWN_REV'
data = os.popen('git describe').read()
match = re.search(r'^(v[0-9].*)', data)