mirror of https://github.com/CGAL/cgal
Fix the script
This commit is contained in:
parent
f09c4ffe4e
commit
f4f3953cc0
|
|
@ -233,6 +233,9 @@ function cleanup() {
|
|||
if [ -d ${release_name} ]; then
|
||||
rm -rf ./"${release_name}"
|
||||
fi
|
||||
if [ -d "${DESTINATION}/${release_name}" ]; then
|
||||
rm -rf "${DESTINATION}/${release_name}"
|
||||
fi
|
||||
if [ -f ${release_name}.tar.gz ]; then
|
||||
rm ${release_name}.tar.gz
|
||||
fi
|
||||
|
|
@ -248,8 +251,8 @@ function cleanup() {
|
|||
trap cleanup EXIT
|
||||
|
||||
# Create the release
|
||||
cmake -DPUBLIC="${DO_PUBLIC}" -DDESTINATION="${DESTINATION}" -DCGAL_VERSION="${release_version}" -DCGAL_VERSION_NR="${release_number}" -DVERBOSE="${VERBOSE}" -P ${SOURCES_DIR}/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake
|
||||
cd "${DESTINATION}/${release_name}"
|
||||
cmake -DPUBLIC=NO -DDESTINATION="${DESTINATION}" -DCGAL_VERSION="${release_version}" -DCGAL_VERSION_NR="${release_number}" -DVERBOSE="${VERBOSE}" -P ${SOURCES_DIR}/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake
|
||||
pushd "${DESTINATION}/${release_name}"
|
||||
sed -i -e "s/define CGAL_GIT_HASH .*/define CGAL_GIT_HASH $CGAL_GIT_HASH/" include/CGAL/version.h
|
||||
cd ..
|
||||
# Make the release tarball
|
||||
|
|
@ -262,6 +265,7 @@ ln -s "${release_name}.tar.gz" "$HTML_DIR/CGAL-last.tar.gz"
|
|||
if [ -z "${NO_TESTSUITE}" ]; then
|
||||
echo "${release_name}.tar.gz" > "${HTML_DIR}/LATEST"
|
||||
fi
|
||||
popd
|
||||
|
||||
# Tag
|
||||
if [ -n "$DO_TAG" ]; then
|
||||
|
|
@ -290,15 +294,12 @@ if [ -n "$DO_PUBLIC" ]; then
|
|||
fi
|
||||
public_release_version="${MAJOR_NUMBER}.${MINOR_NUMBER}${BUGFIX_STRING}"
|
||||
if [ -n "$BETA" ]; then
|
||||
public_release_name="CGAL-${public_release_version}-beta${BETA}"
|
||||
elif [ -r "${NUMBERS_DIR}/public_release_name" ]; then
|
||||
public_release_name=`cat "${NUMBERS_DIR}/public_release_name"`
|
||||
else
|
||||
public_release_name="CGAL-${public_release_version}"
|
||||
public_release_version="${public_release_version}-beta${BETA}"
|
||||
fi
|
||||
mv -T ${release_name} $public_release_name
|
||||
public_release_name="CGAL-${public_release_version}"
|
||||
|
||||
cd ${public_release_name}
|
||||
cmake -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}"
|
||||
|
||||
# Modify the version numbers in <CGAL/version.h>
|
||||
sed -i -e "s/define CGAL_VERSION .*/define CGAL_VERSION $public_release_version/" -e "s/define CGAL_VERSION_NR .*/define CGAL_VERSION_NR $public_release_number/" include/CGAL/version.h
|
||||
|
|
@ -320,10 +321,11 @@ if [ -n "$DO_PUBLIC" ]; then
|
|||
cp "${public_release_name}.zip" "${HTML_DIR}/${release_name}-public/"
|
||||
rm -f "$HTML_DIR/CGAL-last-public"
|
||||
ln -s "${release_name}-public" "$HTML_DIR/CGAL-last-public"
|
||||
popd
|
||||
fi
|
||||
|
||||
|
||||
if [ -n "$DO_PUBLIC" ]; then
|
||||
if docker version > /dev/null; then
|
||||
# Build the Windows installer
|
||||
docker pull cgal/cgal-nsis-dockerfile
|
||||
docker create -v `realpath ${public_release_name}`:/mnt/cgal_release:ro,z \
|
||||
|
|
@ -333,4 +335,7 @@ if [ -n "$DO_PUBLIC" ]; then
|
|||
docker start -a ${container_id}
|
||||
docker cp ${container_id}:/nsis_release/${public_release_name}-Setup.exe "${HTML_DIR}/${release_name}-public/"
|
||||
docker rm ${container_id}
|
||||
else
|
||||
echo "Cannot use Docker, the Windows installer will not be created" >&2
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue