summaryrefslogtreecommitdiff
path: root/make-version.pl
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-01-25 13:50:37 -0800
committerGuy Harris <guy@alum.mit.edu>2015-01-25 21:51:13 +0000
commitc1078963b2ae0065b6ac8234b06f5a54737798a6 (patch)
treed723f74c256a507ab2324df665334855a84323bb /make-version.pl
parenta3f3d0b7a07ede6faf108ab7bb17f75ef55ce7ff (diff)
downloadwireshark-c1078963b2ae0065b6ac8234b06f5a54737798a6.tar.gz
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>
Diffstat (limited to 'make-version.pl')
-rwxr-xr-xmake-version.pl36
1 files changed, 18 insertions, 18 deletions
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) {