diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-01-25 12:50:05 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-01-25 20:50:42 +0000 |
commit | a3f3d0b7a07ede6faf108ab7bb17f75ef55ce7ff (patch) | |
tree | 4ad1657452ba28c7841a4c9b697866f83f30fc02 /make-version.pl | |
parent | bba51b649c806f6e2b487107a1e09c1836eea731 (diff) | |
download | wireshark-a3f3d0b7a07ede6faf108ab7bb17f75ef55ce7ff.tar.gz wireshark-a3f3d0b7a07ede6faf108ab7bb17f75ef55ce7ff.tar.bz2 wireshark-a3f3d0b7a07ede6faf108ab7bb17f75ef55ce7ff.zip |
Don't say "Git Rev" if the VCS being used isn't Git.
Change-Id: Ibd298b9665214e8af137a05ffb0c0aee67af91bf
Reviewed-on: https://code.wireshark.org/review/6777
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'make-version.pl')
-rwxr-xr-x | make-version.pl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/make-version.pl b/make-version.pl index 7263079519..d924221678 100755 --- a/make-version.pl +++ b/make-version.pl @@ -66,6 +66,7 @@ use English; my $version_file = 'version.h'; my $package_string = ""; my $vconf_file = 'version.conf'; +my $vcs_name = "Git"; my $tortoise_file = "tortoise_template"; my $last_change = 0; my $num_commits = 0; @@ -211,6 +212,7 @@ sub read_repo_info { if ($line =~ /Repository Root: (\S+)/) { $repo_root = $1; } + $vcs_name = "SVN"; } 1; }; @@ -231,6 +233,7 @@ sub read_repo_info { if ($tortoise == 0) { $do_hack = 0; } + $vcs_name = "SVN"; #clean up the template file unlink($tortoise_file); @@ -299,6 +302,7 @@ sub read_repo_info { $num_commits = $1; $repo_branch = $2; } + $vcs_name = "Bzr"; } 1; }; @@ -595,11 +599,12 @@ sub print_GIT_REVISION $git_description . "\"\n" . "#define GITBRANCH \"" . $repo_branch . "\"\n"; } elsif ($last_change && $num_commits) { - $GIT_REVISION = "#define GITVERSION \"Git Rev " . + $GIT_REVISION = "#define GITVERSION \"" . $vcs_name . " Rev " . $num_commits . "\"\n" . "#define GITBRANCH \"" . $repo_branch . "\"\n"; } else { - $GIT_REVISION = "#define GITVERSION \"Git Rev Unknown\"\n" . + $GIT_REVISION = "#define GITVERSION \"" . $vcs_name . + " Rev Unknown\"\n" . "#define GITBRANCH \"unknown\"\n"; } if (open(OLDREV, "<$version_file")) { |