From 6db6ac10755ed3103c07b7c78d7f11ec8fd0a56e Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Fri, 1 Mar 2024 05:23:48 -0700 Subject: [PATCH] stable/20240000: run master bin/new_release.sh with release equal to 4. --- CMakeLists.txt | 2 +- bin/check_version.sh | 36 +++++++++++++----------------------- user_guide.xrst | 2 +- 3 files changed, 15 insertions(+), 25 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f981a5e1..9fc42c584 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ IF( POLICY CMP0054 ) ENDIF( POLICY CMP0054 ) # # cppad_version is used by version.sh to get the version number. -SET(cppad_version "20240000.3") +SET(cppad_version "20240000.4") SET(cppad_url "https://coin-or.github.io/CppAD" ) SET(cppad_description "Differentiation of C++ Algorithms" ) IF( NOT DEFINED CMAKE_BUILD_TYPE) diff --git a/bin/check_version.sh b/bin/check_version.sh index 7c87a8a2d..92bd10457 100755 --- a/bin/check_version.sh +++ b/bin/check_version.sh @@ -2,7 +2,7 @@ set -e -u # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later # SPDX-FileCopyrightText: Bradley M. Bell -# SPDX-FileContributor: 2003-22 Bradley M. Bell +# SPDX-FileContributor: 2003-24 Bradley M. Bell # ---------------------------------------------------------------------------- if [ $# != 0 ] then @@ -46,31 +46,21 @@ version=$( sed -e 's|.*"\([^"]*\)".*|\1|' ) # -# version, release -release='yes' -if echo $version | grep '[0-9]\{4\}0000[.]' > /dev/null +# branch +branch=$(git branch | sed -n -e '/^[*]/p' | sed -e 's|^[*] *||') +# +# version +if [ "$branch" == 'master' ] +then + version=$( date +%Y%m%d ) +fi +if echo $branch | grep '^stable/' > /dev/null then - res='' - while [ "$res" != 'ok' ] && [ "$res" != 'date' ] && [ "$res" != 'abort' ] - do - echo "In CMakeLists.txt version = $version" - echo 'ok: use this version.' - echo 'date: repalce this by the current date.' - echo 'abort: if you whish to change the version in CMakeLists.txt.' - read -p '[ok/date/abort] ?' res - done - if [ "$res" == 'abort' ] + if ! echo $version | grep '^[0-9]\{4\}0000[.]' > /dev/null then + echo 'check_version.sh: Stable version does not begin with yyyy0000.' exit 1 fi - if [ "$res" == 'date' ] - then - release='no' - version=$( date +%Y%m%d ) - fi -else - release='no' - version=$( date +%Y%m%d ) fi # # version_ok @@ -83,7 +73,7 @@ version_files=' ' # # temp.sed -if [ "$release" == 'yes' ] +if echo $branch | grep '^stable/' > /dev/null then stable=$( echo $version | sed -e 's|[.][0-9]*$||' ) cat << EOF > temp.sed diff --git a/user_guide.xrst b/user_guide.xrst index 4bb1a4da7..62ecce4e3 100644 --- a/user_guide.xrst +++ b/user_guide.xrst @@ -20,7 +20,7 @@ cppad-20240000: CppAD User's Manual .. list-table:: :widths: auto - * - `release-20240000.3 `_ + * - `release-20240000.4 `_ - `documentation-latest `_ - `other releases `_ - `github `_