summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-05-24 12:04:11 (GMT)
committerBrad King <brad.king@kitware.com>2019-05-24 12:04:11 (GMT)
commit3a0ab3ba2303784e20f1025cf3cd337d840a5b17 (patch)
treef08d499a2e9ca97829114a01514631c67d1f8416
parentc22693b99df12f540480438275cd5bae1cfc5846 (diff)
downloadCMake-3a0ab3ba2303784e20f1025cf3cd337d840a5b17.zip
CMake-3a0ab3ba2303784e20f1025cf3cd337d840a5b17.tar.gz
CMake-3a0ab3ba2303784e20f1025cf3cd337d840a5b17.tar.bz2
Utilities/Release: Teach upload script to compute version automatically
Read the version from `Source/CMakeVersion.cmake` instead of repeating it.
-rw-r--r--Help/dev/maint.rst6
-rw-r--r--Utilities/Release/upload_release.cmake3
2 files changed, 2 insertions, 7 deletions
diff --git a/Help/dev/maint.rst b/Help/dev/maint.rst
index a8942cd..1153a09 100644
--- a/Help/dev/maint.rst
+++ b/Help/dev/maint.rst
@@ -188,12 +188,6 @@ Update ``Source/CMakeVersion.cmake`` to set the version to
set(CMake_VERSION_PATCH 0)
set(CMake_VERSION_RC 1)
-Update ``Utilities/Release/upload_release.cmake``:
-
-.. code-block:: cmake
-
- set(VERSION $ver)
-
Update uses of ``DEVEL_CMAKE_VERSION`` in the source tree to mention the
actual version number:
diff --git a/Utilities/Release/upload_release.cmake b/Utilities/Release/upload_release.cmake
index 3613ae7..d78e68a 100644
--- a/Utilities/Release/upload_release.cmake
+++ b/Utilities/Release/upload_release.cmake
@@ -1,6 +1,7 @@
set(CTEST_RUN_CURRENT_SCRIPT 0)
if(NOT VERSION)
- set(VERSION 3.14)
+ include(${CMAKE_CURRENT_LIST_DIR}/../../Source/CMakeVersion.cmake)
+ set(VERSION ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR})
endif()
if(NOT DEFINED PROJECT_PREFIX)
set(PROJECT_PREFIX cmake-${VERSION})