From 6304c69b45c45d748ee73a80a581904b8bec00b9 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 3 Nov 2007 22:56:26 +0100 Subject: [PATCH] s/-/./ in snapshot version string: 2.61a-256-8b556 -> 2.61a.256-8b556 * build-aux/git-version-gen: This syncs from coreutils. --- ChangeLog | 3 +++ build-aux/git-version-gen | 31 +++++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d1eece0e..d52ab6c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2007-11-03 Jim Meyering + s/-/./ in snapshot version string: 2.61a-256-8b556 -> 2.61a.256-8b556 + * build-aux/git-version-gen: This syncs from coreutils. + Adjust the build procedure so "make check" works reliably. * README-hacking: Include an extra step between "make" and "make check" to ensure that the latter passes. diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen index 78635f54..5f866258 100755 --- a/build-aux/git-version-gen +++ b/build-aux/git-version-gen @@ -1,5 +1,24 @@ #!/bin/sh # Print a version string. +scriptversion=2007-11-03.22 + +# Copyright (C) 2007 Free Software Foundation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + # This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/. # It may be run two ways: # - from a git repository in which the git-describe command below @@ -40,8 +59,9 @@ elif test -d .git \ *) (exit 1) ;; esac then - # Remove the "g" in git-describe's output string. - v=`echo "$v" | sed 's/\(.*\)-g/\1-/'`; + # Change the first '-' to a '.', so version-comparing tools work properly. + # Remove the "g" in git-describe's output string, to save a byte. + v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; else v=UNKNOWN fi @@ -63,3 +83,10 @@ esac # Omit the trailing newline, so that m4_esyscmd can use the result directly. echo "$v" | tr -d '\012' + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: -- 2.11.4.GIT