aboutsummaryrefslogtreecommitdiffstats
path: root/make-version.pl
diff options
context:
space:
mode:
authorJoakim Karlsson <oakimk@gmail.com>2018-05-23 23:50:41 +0200
committerAnders Broman <a.broman58@gmail.com>2018-05-24 04:15:00 +0000
commit790d4902496f8dcec54d83e34b6674701ac4f981 (patch)
treedfa53cc9fe2507fd7a0310ef64929e09b0cd6ffa /make-version.pl
parent1b6c702226a6b84ad89b2acc444254b93bf616b7 (diff)
CMake: remove GIT_BIN_PARAM
Added in adb731c1cd69855b1655a0f23001655392a07340 but never worked, and later corrected in e21da738262af2ba6cf72f46fdc045f0337ca27e. Correction however gave cygwin user problems with the perl optional parameter which droped qoutes around the path. But since the orginal commit never worked as intended in the beginning, it's assume safe to remove. Change-Id: I825a4e53b257d47601c330b210ac5ffb6870e0d9 Reviewed-on: https://code.wireshark.org/review/27758 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'make-version.pl')
-rwxr-xr-xmake-version.pl18
1 files changed, 8 insertions, 10 deletions
diff --git a/make-version.pl b/make-version.pl
index a241ec4810..dc24716c17 100755
--- a/make-version.pl
+++ b/make-version.pl
@@ -64,7 +64,6 @@ my $last_change = 0;
my $num_commits = 0;
my $commit_id = '';
my $repo_branch = "unknown";
-my $git_executable = "git";
my $git_description = undef;
my $get_vcs = 0;
my $set_vcs = 0;
@@ -139,13 +138,13 @@ sub read_repo_info {
$version_pref{"svn_client"} = 1;
} elsif (-d "$srcdir/.git/svn") {
$info_source = "Command line (git-svn)";
- $info_cmd = "(cd $srcdir; $git_executable svn info)";
+ $info_cmd = "(cd $srcdir; git svn info)";
$is_git_repo = 1;
$version_pref{"git_svn"} = 1;
}
# Make sure git is available.
- if ($is_git_repo && !`$git_executable --version`) {
+ if ($is_git_repo && !`git --version`) {
print STDERR "Git unavailable. Git revision will be missing from version string.\n";
return;
}
@@ -192,13 +191,13 @@ sub read_repo_info {
use warnings "all";
no warnings "all";
- chomp($line = qx{$git_executable --git-dir="$srcdir"/.git log -1 --pretty=format:%at});
+ chomp($line = qx{git --git-dir="$srcdir"/.git log -1 --pretty=format:%at});
if ($? == 0 && length($line) > 1) {
$last_change = $line;
}
# Commits since last annotated tag.
- chomp($line = qx{$git_executable --git-dir="$srcdir"/.git describe --abbrev=8 --long --always --match "v[1-9]*"});
+ chomp($line = qx{git --git-dir="$srcdir"/.git describe --abbrev=8 --long --always --match "v[1-9]*"});
if ($? == 0 && length($line) > 1) {
my @parts = split(/-/, $line);
$git_description = $line;
@@ -208,7 +207,7 @@ sub read_repo_info {
# This will break in some cases. Hopefully not during
# official package builds.
- chomp($line = qx{$git_executable --git-dir="$srcdir"/.git rev-parse --abbrev-ref --symbolic-full-name \@\{upstream\} 2> $devnull});
+ chomp($line = qx{git --git-dir="$srcdir"/.git rev-parse --abbrev-ref --symbolic-full-name \@\{upstream\} 2> $devnull});
if ($? == 0 && length($line) > 1) {
$repo_branch = basename($line);
}
@@ -279,21 +278,21 @@ sub read_repo_info {
# If someone had properly tagged 1.9.0 we could also use
# "git describe --abbrev=1 --tags HEAD"
- $info_cmd = "(cd $srcdir; $git_executable log --format='%b' -n 1)";
+ $info_cmd = "(cd $srcdir; git log --format='%b' -n 1)";
$line = qx{$info_cmd};
if (defined($line)) {
if ($line =~ /svn path=.*; revision=(\d+)/) {
$num_commits = $1;
}
}
- $info_cmd = "(cd $srcdir; $git_executable log --format='%ad' -n 1 --date=iso)";
+ $info_cmd = "(cd $srcdir; git log --format='%ad' -n 1 --date=iso)";
$line = qx{$info_cmd};
if (defined($line)) {
if ($line =~ /(\d{4})-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)/) {
$last_change = timegm($6, $5, $4, $3, $2 - 1, $1);
}
}
- $info_cmd = "(cd $srcdir; $git_executable branch)";
+ $info_cmd = "(cd $srcdir; git branch)";
$line = qx{$info_cmd};
if (defined($line)) {
if ($line =~ /\* (\S+)/) {
@@ -627,7 +626,6 @@ sub get_config {
"help|h", \$show_help,
"get-vcs|get-svn|g", \$get_vcs,
"set-vcs|set-svn|s", \$set_vcs,
- "git-bin=s" => \$git_executable,
"print-vcs", \$print_vcs,
"set-version|v", \$set_version,
"set-release|r|package-version|p", \$set_release,