]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
announce-gen: Support VPATH builds better.
authorSimon Josefsson <simon@josefsson.org>
Sat, 28 Dec 2024 18:42:43 +0000 (19:42 +0100)
committerSimon Josefsson <simon@josefsson.org>
Sat, 28 Dec 2024 18:42:43 +0000 (19:42 +0100)
* build-aux/announce-gen: Pass -C$srcdir to git.

ChangeLog
build-aux/announce-gen

index b99da8b96a4ce8501a4abc270d7ef78c4488ea22..2eed147ec8376f7c0fffe5c462595ea667fd1f2f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-12-28  Simon Josefsson  <simon@josefsson.org>
+
+       announce-gen: Support VPATH builds better.
+       * build-aux/announce-gen: Pass -C$srcdir to git.
+
 2024-12-28  Bruno Haible  <bruno@clisp.org>
 
        endian: Fix link error on CentOS 5.
index cc1d46039f2555de1811279d8fe138a008f0dda6..2bfa393a7da2bd32aee4ea953d322396a5138ad6 100755 (executable)
@@ -35,7 +35,7 @@
 eval 'exec perl -wSx "$0" "$@"'
      if 0;
 
-my $VERSION = '2024-12-10 08:57'; # UTC
+my $VERSION = '2024-12-28 18:31'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
@@ -566,19 +566,19 @@ EOF
   my $v0 = $prev_version;
   my $v1 = $curr_version;
 
-  (my $first_name = `git config user.name|cut -d' ' -f1`)
+  (my $first_name = `git -C "$srcdir" config user.name|cut -d' ' -f1`)
     =~ m{\S} or die "no name? set user.name in ~/.gitconfig\n";
 
-  chomp (my $n_ci = `git rev-list "v$v0..v$v1" | wc -l`);
-  chomp (my $n_p = `git shortlog "v$v0..v$v1" | grep -c '^[^ ]'`);
+  chomp (my $n_ci = `git -C "$srcdir" rev-list "v$v0..v$v1" | wc -l`);
+  chomp (my $n_p = `git -C "$srcdir" shortlog "v$v0..v$v1" | grep -c '^[^ ]'`);
 
-  my $this_commit_hash = `git log --pretty=%H -1 "v$v1"`;
+  my $this_commit_hash = `git -C "$srcdir" log --pretty=%H -1 "v$v1"`;
   chop $this_commit_hash;
-  my $prev_release_date = `git log --pretty=%ct -1 "v$v0"`;
-  my $this_release_date = `git log --pretty=%ct -1 "v$v1"`;
+  my $prev_release_date = `git -C "$srcdir" log --pretty=%ct -1 "v$v0"`;
+  my $this_release_date = `git -C "$srcdir" log --pretty=%ct -1 "v$v1"`;
   my $n_seconds = $this_release_date - $prev_release_date;
   my $time_since_prev = readable_interval $n_seconds;
-  my $names = `git shortlog "v$v0..v$v1"|perl -lne '/^(\\w.*):/ and print "  ".\$1'`;
+  my $names = `git -C "$srcdir" shortlog "v$v0..v$v1"|perl -lne '/^(\\w.*):/ and print "  ".\$1'`;
 
   print <<EOF;
 There have been $n_ci commits by $n_p people in the $time_since_prev since $v0.