[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
git-version-gen: allow 'snapshot' as .tarball-version contents
From: |
Bruno Haible |
Subject: |
git-version-gen: allow 'snapshot' as .tarball-version contents |
Date: |
Sun, 13 Oct 2019 18:30:47 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-165-generic; KDE/5.18.0; x86_64; ; ) |
Hi,
git-version-gen currently rejects some forms of .tarball-version:
$ cat > .tarball-version
20191011
$ build-aux/git-version-gen .tarball-version; echo
20191011
$ cat > .tarball-version
snapshot
$ build-aux/git-version-gen .tarball-version; echo
build-aux/git-version-gen: WARNING: .tarball-version is missing or damaged
UNKNOWN
I need a non-numeric version for continuous publishing of gettext snapshot
tarballs, and I want the tarballs to be called gettext-snapshot.tar.gz,
not gettext-UNKNOWN.tar.gz.
This patch fixes the problem.
2019-10-13 Bruno Haible <address@hidden>
git-version-gen: Allow 'snapshot' as .tarball-version contents.
* build-aux/git-version-gen: Don't map non-numeric .tarball-version
contents to the empty string.
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index 45b5656..d855645 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -142,11 +142,9 @@ then
v=`cat $tarball_version_file` || v=
case $v in
*$nl*) v= ;; # reject multi-line output
- [0-9]*) ;;
- *) v= ;;
esac
test "x$v" = x \
- && echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2
+ && echo "$0: WARNING: $tarball_version_file is damaged" 1>&2
fi
if test "x$v" != x
- git-version-gen: allow 'snapshot' as .tarball-version contents,
Bruno Haible <=