texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Gavin D. Smith
Date: Mon, 23 Dec 2024 09:22:28 -0500 (EST)

branch: master
commit 23d7feb5b97cc8abb94c7e88a41387331d76f5e3
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Mon Dec 23 14:21:46 2024 +0000

    Version updating script
    
    * update-version.sh: New file.
    * Makefile.am (update-version): Add rule.
    * README-hacking: update instructions
---
 ChangeLog         |  8 ++++++++
 Makefile.am       |  4 ++++
 README-hacking    |  8 ++------
 update-version.sh | 39 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 53 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index faee201976..3f1dd51990 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-12-23  Gavin Smith <gavinsmith0123@gmail.com>
+
+       Version updating script
+
+       * update-version.sh: New file.
+       * Makefile.am (update-version): Add rule.
+       * README-hacking: update instructions
+
 2024-12-23  Gavin Smith <gavinsmith0123@gmail.com>
 
        * doc/refcard/txirefcard.tex: remove comments after defines
diff --git a/Makefile.am b/Makefile.am
index 80a3cac96d..a629495d52 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -98,6 +98,10 @@ dtd-check:
        && diff $@-1 $(srcdir)/util/texinfo.dtd \
        && rm -f $@-1
 
+# For updating version number
+update-version:
+       ./update-version.sh $(srcdir)
+
 # For updating copyright years
 grand-replace:
        ./grand-replace.sh $(srcdir)
diff --git a/README-hacking b/README-hacking
index 1817debf40..ea15b3a66b 100644
--- a/README-hacking
+++ b/README-hacking
@@ -511,13 +511,9 @@ Check "dist-xz" is in the option list in configure.ac 
(often removed
 for speed when testing).
 
 Update version number:
-  update version number in configure.ac, util/texi2dvi, util/texi2pdf,
-    js/info.js
-  version number in txirefcard.tex (offical releases only)
+  new version in configure.ac then "make update-version"
   (cd texindex ; rm texindex.awk ; make)
-  (cd tp && ./maintain/change_perl_modules_version.sh auto)
-    -- this updates all the version numbers in the Perl modules and
-       in tp/Texinfo/XS/configure.ac
+
 check up to date copyright years in files relevant to --version calls
 (tp/texi2any.pl, info/info.c, install-info/install-info.c, texindex/ti.twjr,
 Pod-Simple-Texinfo/pod2texi)
diff --git a/update-version.sh b/update-version.sh
new file mode 100755
index 0000000000..334358275d
--- /dev/null
+++ b/update-version.sh
@@ -0,0 +1,39 @@
+# update-version.sh - version number updating
+# invoke as update-version.sh $top_srcdir
+
+dir=$1
+
+if test z"$dir" = z ; then
+  echo "need argument"
+  exit 1
+fi
+
+if ! test -d "$dir" ; then
+  echo "no dir $dir"
+  exit 1
+fi
+cd $dir
+
+# extract version number from configure.ac
+#
+version=$(grep '^AC_INIT' configure.ac | sed -e 's/^[^0-9]*//' -e 's/].*//')
+echo vers is $version
+if test z"$version" = "z" ; then
+  echo "cannot proceed"
+  exit 1
+fi
+
+set -x
+
+perl -wpli -e 's/\(GNU Texinfo .*$/(GNU Texinfo '$version')/' util/texi2dvi
+perl -wpli -e 's/\(GNU Texinfo .*$/(GNU Texinfo '$version')/' util/texi2pdf
+perl -wpli -e \
+  's/(Texinfo documentation viewer )[0-9.]*(,)/${1}'$version'${2}/' \
+  js/info.js
+perl -wpli -e \
+  's/(\\versionTexinfo\{).*$/${1}'$version'}/' \
+  doc/refcard/txirefcard.tex
+
+(cd tp && ./maintain/change_perl_modules_version.sh auto)
+
+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]