commit 588f7708f808c043b8f535b2b020de3861fa5cd9
parent dd5e553ca3d38d93551ae48767b72453352caac9
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 30 Oct 2025 21:31:46 +0100
fix bump script
Diffstat:
| A | contrib/bump | | | 63 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| D | contrib/bump-version | | | 59 | ----------------------------------------------------------- |
2 files changed, 63 insertions(+), 59 deletions(-)
diff --git a/contrib/bump b/contrib/bump
@@ -0,0 +1,63 @@
+#!/usr/bin/env bash
+# This file is in the public domain.
+set -eu
+
+if [ $# != 1 ]; then
+ >&2 echo "Illegal number of arguments"
+ >&2 echo "Usage: $0 <version>"
+ exit -1
+fi
+
+PACKAGE=challenger
+VERSION="$1"
+DATE="$(date -R)"
+GIT_USER="$(git config user.name)"
+GIT_EMAIL="$(git config user.email)"
+
+function updated {
+ local FILE=$1
+ if [[ $(grep "${VERSION}" "${FILE}") ]]; then
+ echo "${FILE} already in ${VERSION}"
+ return -1
+ fi
+}
+
+# update configure.ac
+function configure_ac {
+ if [[ $(grep AC_INIT configure.ac | grep "${VERSION}") ]];
+ then
+ echo "configure.ac already in ${VERSION}"
+ return 0
+ fi
+
+ sed -i "/AC_INIT/s/,\\[\\(.*\\)\\],/,[${VERSION}],/" configure.ac
+ echo "configure.ac ${VERSION}"
+}
+
+# update debian/changelog
+function debian_changelog {
+ updated debian/changelog || return 0
+
+ cat <<EOF > ./debian/changelog.tmp
+$PACKAGE (${VERSION}) unstable; urgency=low
+
+ * Release ${VERSION}.
+
+ -- ${GIT_USER} <${GIT_EMAIL}> ${DATE}
+
+EOF
+ cat ./debian/changelog >> ./debian/changelog.tmp
+ mv ./debian/changelog.tmp ./debian/changelog
+ echo "debian/changelog ${VERSION}"
+}
+
+function doc_doxygen_challenger_doxy {
+ updated doc/doxygen/challenger.doxy || return 0
+
+ sed -i "/PROJECT_NUMBER/s/= \(.*\)/= ${VERSION}/" doc/doxygen/challenger.doxy
+ echo "doc/doxygen/challenger.doxy ${VERSION}"
+}
+
+configure_ac
+debian_changelog
+doc_doxygen_challenger_doxy
diff --git a/contrib/bump-version b/contrib/bump-version
@@ -1,59 +0,0 @@
-#!/usr/bin/env bash
-# This file is in the public domain.
-set -eu
-
-if [ $# != 1 ]; then
- >&2 echo "Illegal number of arguments"
- >&2 echo "Usage: $0 <version>"
- exit -1
-fi
-
-PACKAGE=challenger
-VERSION="$1"
-DATE="$(date -R)"
-GIT_USER="$(git config user.name)"
-GIT_EMAIL="$(git config user.email)"
-
-function updated {
- local FILE=$1
- if [[ $(grep "${VERSION}" "${FILE}") ]]; then
- echo "${FILE} already in ${VERSION}"
- return -1
- fi
-}
-
-# update configure.ac
-function configure_ac {
- updated configure.ac || return 0
-
- sed -i "/AC_INIT/s/,\\[\\(.*\\)\\],/,[${VERSION}],/" configure.ac
- echo "configure.ac ${VERSION}"
-}
-
-# update debian/changelog
-function debian_changelog {
- updated debian/changelog || return 0
-
- cat <<EOF > ./debian/changelog.tmp
-$PACKAGE (${VERSION}) unstable; urgency=low
-
- * Release ${VERSION}.
-
- -- ${GIT_USER} <${GIT_EMAIL}> ${DATE}
-
-EOF
- cat ./debian/changelog >> ./debian/changelog.tmp
- mv ./debian/changelog.tmp ./debian/changelog
- echo "debian/changelog ${VERSION}"
-}
-
-function doc_doxygen_challenger_doxy {
- updated doc/doxygen/challenger.doxy || return 0
-
- sed -i "/PROJECT_NUMBER/s/= \(.*\)/= ${VERSION}/" doc/doxygen/challenger.doxy
- echo "doc/doxygen/challenger.doxy ${VERSION}"
-}
-
-configure_ac
-debian_changelog
-doc_doxygen_challenger_doxy