Change create_new_release to use CGALConfigVersion.cmake as input

This commit is contained in:
Laurent Rineau 2020-05-01 16:24:19 +02:00
parent 4092727cf8
commit abf414df81
7 changed files with 18 additions and 8 deletions

View File

@ -1,7 +1,8 @@
set(CGAL_MAJOR_VERSION 4)
set(CGAL_MINOR_VERSION 14)
set(CGAL_BUGFIX_VERSION 4)
set(CGAL_VERSION_PUBLIC_RELEASE_NAME "CGAL-4.14.4")
set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "4.14.4")
set(CGAL_VERSION_PUBLIC_RELEASE_NAME "CGAL-${CGAL_VERSION_PUBLIC_RELEASE_VERSION}")
if (CGAL_BUGFIX_VERSION AND CGAL_BUGFIX_VERSION GREATER 0)
set(CGAL_CREATED_VERSION_NUM "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUGFIX_VERSION}")

View File

@ -1 +0,0 @@
4

View File

@ -1 +0,0 @@
4

View File

@ -1 +0,0 @@
14

View File

@ -1 +0,0 @@
CGAL-4.14.4

View File

@ -180,9 +180,13 @@ else
fi
# Set the major/minor/bugfix release numbers
NUMBERS_DIR=${SOURCES_DIR}/Maintenance/release_building
MAJOR_NUMBER=`cat ${NUMBERS_DIR}/MAJOR_NUMBER` # 2 digits max
MINOR_NUMBER=`cat ${NUMBERS_DIR}/MINOR_NUMBER` # 2 digits max
BUGFIX_NUMBER=`cat ${NUMBERS_DIR}/BUGFIX_NUMBER` # 1 digit max
if [ -f ${NUMBERS_DIR}/MAJOR_NUMBER ]; then
MAJOR_NUMBER=`cat ${NUMBERS_DIR}/MAJOR_NUMBER` # 2 digits max
MINOR_NUMBER=`cat ${NUMBERS_DIR}/MINOR_NUMBER` # 2 digits max
BUGFIX_NUMBER=`cat ${NUMBERS_DIR}/BUGFIX_NUMBER` # 1 digit max
else
eval $(cmake -DCGALCONFIGVERSIONFILE=${SOURCES_DIR}/CGALConfigVersion.cmake -P ${SOURCES_DIR}/Scripts/developer_scripts/create_new_release_evaluate_versions.cmake 2>&1)
fi
# Do not show the bugfix number if it is 0.
if [ x"$BUGFIX_NUMBER" != "x0" ]; then
@ -302,6 +306,9 @@ if [ -n "$DO_PUBLIC" ]; then
else
public_release_name="CGAL-${public_release_version}"
fi
if ! [ -f ${NUMBERS_DIR}/MAJOR_NUMBER ]; then
eval $(cmake -DCGALCONFIGVERSIONFILE=${SOURCES_DIR}/CGALConfigVersion.cmake -P ${SOURCES_DIR}/Scripts/developer_scripts/create_new_release_evaluate_versions.cmake 2>&1)
fi
cmake -DGIT_REPO=${SOURCES_DIR} -DPUBLIC="ON" -DDESTINATION="${DESTINATION}" -DCGAL_VERSION="${public_release_version}" -DCGAL_VERSION_NR="${release_number}" -DVERBOSE="${VERBOSE}" -P ${SOURCES_DIR}/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake
pushd "${DESTINATION}/${public_release_name}"

View File

@ -0,0 +1,6 @@
include(${CGALCONFIGVERSIONFILE})
message("MAJOR_NUMBER=${CGAL_MAJOR_VERSION}
MINOR_NUMBER=${CGAL_MINOR_VERSION}
BUGFIX_NUMBER=${CGAL_BUGFIX_VERSION}
public_release_version=${CGAL_VERSION_PUBLIC_RELEASE_VERSION}
public_release_name=${CGAL_VERSION_PUBLIC_RELEASE_NAME}")