diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-01-25 13:50:37 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-01-25 21:51:13 +0000 |
commit | c1078963b2ae0065b6ac8234b06f5a54737798a6 (patch) | |
tree | d723f74c256a507ab2324df665334855a84323bb | |
parent | a3f3d0b7a07ede6faf108ab7bb17f75ef55ce7ff (diff) | |
download | wireshark-c1078963b2ae0065b6ac8234b06f5a54737798a6.tar.gz wireshark-c1078963b2ae0065b6ac8234b06f5a54737798a6.tar.bz2 wireshark-c1078963b2ae0065b6ac8234b06f5a54737798a6.zip |
Replace "GIT" with "VCS" in make-version.pl and files it manipulates.
That makes it more VCS-neutral - apparently some people maintain private
versions under VCSes other than Git, and make-version.pl still handles
those VCSes.
Change-Id: Ie4914b16fea8ce800582729260c5e9b9cf1111f4
Reviewed-on: https://code.wireshark.org/review/6779
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | config.nmake | 6 | ||||
-rwxr-xr-x | make-version.pl | 36 | ||||
-rw-r--r-- | wsutil/ws_version_info.c | 4 |
3 files changed, 23 insertions, 23 deletions
diff --git a/config.nmake b/config.nmake index 346f6686ea..942499ef28 100644 --- a/config.nmake +++ b/config.nmake @@ -28,15 +28,15 @@ WIRESHARK_TARGET_PLATFORM=win32 ##### Versions ##### -# The Git description of our build. Updated by make-version.pl -GIT_REVISION=0 +# The VCS's description of our build. Updated by make-version.pl +VCS_REVISION=0 # The current Wireshark version. Recommended: Leave unchanged. # Updated by make-version.pl VERSION_MAJOR=1 VERSION_MINOR=99 VERSION_MICRO=2 -VERSION_BUILD=$(GIT_REVISION) +VERSION_BUILD=$(VCS_REVISION) # Local build information. Recommended: Unique string for your # environment, e.g. "-JackStackBarbecue". Updated by make-version.pl diff --git a/make-version.pl b/make-version.pl index d924221678..e4a7614dc7 100755 --- a/make-version.pl +++ b/make-version.pl @@ -223,8 +223,8 @@ sub read_repo_info { } elsif ($version_pref{"tortoise_svn"}) { # Dynamically generic template file needed by TortoiseSVN open(TORTOISE, ">$tortoise_file"); - print TORTOISE "#define GITVERSION \"\$WCREV\$\"\r\n"; - print TORTOISE "#define GITBRANCH \"\$WCURL\$\"\r\n"; + print TORTOISE "#define VCSVERSION \"\$WCREV\$\"\r\n"; + print TORTOISE "#define VCSBRANCH \"\$WCURL\$\"\r\n"; close(TORTOISE); $info_source = "Command line (SubWCRev)"; @@ -245,7 +245,7 @@ sub read_repo_info { my $filepath = "$srcdir/config.nmake"; open(CFGNMAKE, "< $filepath") || die "Can't read $filepath!"; while ($line = <CFGNMAKE>) { - if ($line =~ /^GIT_REVISION=(\d+)/) { + if ($line =~ /^VCS_REVISION=(\d+)/) { $num_commits = $1; $do_hack = 0; last; @@ -459,8 +459,8 @@ sub update_config_nmake open(CFGNMAKE, "< $filepath") || die "Can't read $filepath!"; while ($line = <CFGNMAKE>) { - if ($line =~ /^GIT_REVISION=.*([\r\n]+)$/) { - $line = sprintf("GIT_REVISION=%d$1", $num_commits); + if ($line =~ /^VCS_REVISION=.*([\r\n]+)$/) { + $line = sprintf("VCS_REVISION=%d$1", $num_commits); } elsif ($set_version && $line =~ /^VERSION_MAJOR=.*([\r\n]+)$/) { $line = sprintf("VERSION_MAJOR=%d$1", $version_pref{"version_major"}); } elsif ($set_version && $line =~ /^VERSION_MINOR=.*([\r\n]+)$/) { @@ -589,27 +589,27 @@ sub update_versioned_files # Print the version control system's version to $version_file. # Don't change the file if it is not needed. -sub print_GIT_REVISION +sub print_VCS_REVISION { - my $GIT_REVISION; + my $VCS_REVISION; my $needs_update = 1; if ($git_description) { - $GIT_REVISION = "#define GITVERSION \"" . + $VCS_REVISION = "#define VCSVERSION \"" . $git_description . "\"\n" . - "#define GITBRANCH \"" . $repo_branch . "\"\n"; + "#define VCSBRANCH \"" . $repo_branch . "\"\n"; } elsif ($last_change && $num_commits) { - $GIT_REVISION = "#define GITVERSION \"" . $vcs_name . " Rev " . + $VCS_REVISION = "#define VCSVERSION \"" . $vcs_name . " Rev " . $num_commits . "\"\n" . - "#define GITBRANCH \"" . $repo_branch . "\"\n"; + "#define VCSBRANCH \"" . $repo_branch . "\"\n"; } else { - $GIT_REVISION = "#define GITVERSION \"" . $vcs_name . + $VCS_REVISION = "#define VCSVERSION \"" . $vcs_name . " Rev Unknown\"\n" . - "#define GITBRANCH \"unknown\"\n"; + "#define VCSBRANCH \"unknown\"\n"; } if (open(OLDREV, "<$version_file")) { - my $old_GIT_REVISION = <OLDREV> . <OLDREV>; - if ($old_GIT_REVISION eq $GIT_REVISION) { + my $old_VCS_REVISION = <OLDREV> . <OLDREV>; + if ($old_VCS_REVISION eq $VCS_REVISION) { $needs_update = 0; } close OLDREV; @@ -618,9 +618,9 @@ sub print_GIT_REVISION if (! $set_svn) { return; } if ($needs_update) { - # print "Updating $version_file so it contains:\n$GIT_REVISION"; + # print "Updating $version_file so it contains:\n$VCS_REVISION"; open(VER, ">$version_file") || die ("Cannot write to $version_file ($!)\n"); - print VER "$GIT_REVISION"; + print VER "$VCS_REVISION"; close VER; print "$version_file has been updated.\n"; } else { @@ -677,7 +677,7 @@ sub get_config { &read_repo_info(); -&print_GIT_REVISION; +&print_VCS_REVISION; if ($set_version || $set_release) { if ($set_version) { diff --git a/wsutil/ws_version_info.c b/wsutil/ws_version_info.c index 14b6cda4f9..f8a266260b 100644 --- a/wsutil/ws_version_info.c +++ b/wsutil/ws_version_info.c @@ -336,8 +336,8 @@ show_version(const gchar *prog_name_str, GString *comp_info_str, const char * get_ws_vcs_version_info(void) { -#ifdef GITVERSION - return VERSION " (" GITVERSION " from " GITBRANCH ")"; +#ifdef VCSVERSION + return VERSION " (" VCSVERSION " from " VCSBRANCH ")"; #else return VERSION; #endif |