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

This commit is contained in:
Nolan Poe 2024-03-09 13:44:25 -08:00 committed by GitHub
parent 9a3aed57b1
commit 04512e5d04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -136,6 +136,7 @@ Mostafa Gamal
Nandu Raj Nandu Raj
Nathan Kohagen Nathan Kohagen
Nathan Myers Nathan Myers
Nolan Poe
Oleh Maksymenko Oleh Maksymenko
Patrick Stewart Patrick Stewart
Paul Swirhun Paul Swirhun

View File

@ -22,7 +22,11 @@ Args = parser.parse_args()
os.chdir(Args.directory) 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() data = os.popen('git describe').read()
match = re.search(r'^(v[0-9].*)', data) match = re.search(r'^(v[0-9].*)', data)