Fix config_rev revision detection on old versions.

This commit is contained in:
Wilson Snyder 2019-09-13 07:20:26 -04:00
parent 1471f5691a
commit baa634343b
2 changed files with 9 additions and 2 deletions

View File

@ -12,6 +12,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
**** Fix error on multidimensional cells, bug1505. [Anderson Ignacio Da Silva]
**** Fix config_rev revision detection on old versions.
* Verilator 4.018 2019-08-29

View File

@ -20,13 +20,18 @@ chdir $dir;
my $rev = 'UNKNOWN_REV';
my $data = `git describe`;
if ($data =~ /(verilator.*)/i) {
if ($data =~ /^(v[0-9].*)/i) {
$rev = $1;
}
elsif ($data =~ /verilator_?(.*)/i) {
$rev = "v".$1;
$rev =~ s/_/./g;
}
$data = `git status`;
if ($data =~ /Changed but not updated/i
|| $data =~ /Changes to be committed/i) {
|| $data =~ /Changes to be committed/i
|| $data =~ /Changes not staged/i) {
$rev .= " (mod)";
}