speed-dreams-code/cmake/prerelease.cmake
xavi92 0e7a45d2be Remove $Id$
This SVN-specific keyword [1] did not expand as expected on Git
repositories migrated from SVN via git-svn(1) [2]. Because of this,
applying patches with modifications would sometimes fail because, even
if these lines were not modified, they could be part of the context
lines, thus heavily confusing Git.

Since it is already expected to migrate from SVN to Git sometime soon,
this would also make $Id$ redundant.

[1]: https://svnbook.red-bean.com/en/1.7/svn.advanced.props.special.keywords.html
[2]: https://git-scm.com/docs/git-svn


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9550 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 7acf9a9675a0496a85ecd61210b8c29c89f9517a
Former-commit-id: 1878bb38889e4dddc83ef762b6b384f0f0a4ecc5
2024-09-30 05:17:15 +00:00

69 lines
2.4 KiB
CMake

#==============================================================================
#
# file : prerelease.cmake
# copyright : (C) 2021 Joe Thompson
# email : beaglejoe@users.sourceforge.net
# web : www.speed-dreams.org
#
#==============================================================================
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#==============================================================================
INCLUDE(cmake/prereleaseutils.cmake)
GET_PROPERTY(SD_TRACK_LIST_ITEMS GLOBAL PROPERTY SD_TRACK_LIST)
GET_PROPERTY(SD_CAR_LIST_ITEMS GLOBAL PROPERTY SD_CAR_LIST)
GET_PROPERTY(SD_ROBOT_LIST_ITEMS GLOBAL PROPERTY SD_ROBOT_LIST)
string(REGEX REPLACE ";" "\n" _tracks_contents "${SD_TRACK_LIST_ITEMS}")
string(REGEX REPLACE ";" "\n" _cars_contents "${SD_CAR_LIST_ITEMS}")
string(REGEX REPLACE ";" "\n" _robots_contents "${SD_ROBOT_LIST_ITEMS}")
message("\n")
message("======= Pre-Release checks =======")
#message("\n")
if(OPTION_OFFICIAL_ONLY)
set(PRE "official")
else()
set(PRE "unofficial")
message("OPTION_OFFICIAL_ONLY NOT set")
endif()
IF(VERSION_IS_TAG)
message(STATUS "VERSION_IS_TAG = ${VERSION_IS_TAG}")
else()
message("working copy is NOT from a tag")
endif()
message(STATUS "SVN_REV = ${SVN_REV}")
message(STATUS "VERSION = ${VERSION}")
#message(STATUS "NSIS_MAKE_EXE = ${NSIS_MAKE_EXE}")
FILE(WRITE "${PROJECT_BINARY_DIR}/${PRE}-tracklist.txt" ${_tracks_contents})
FILE(WRITE "${PROJECT_BINARY_DIR}/${PRE}-carlist.txt" ${_cars_contents})
FILE(WRITE "${PROJECT_BINARY_DIR}/${PRE}-robotlist.txt" ${_robots_contents})
message("==== Checking cars ====")
check_cars("${SD_CAR_LIST_ITEMS}")
message("==== Checking tracks ====")
check_tracks("${SD_TRACK_LIST_ITEMS}")
message("==== Checking robots ====")
check_robots("${SD_ROBOT_LIST_ITEMS}")