diff options
author | Andrew <forkk@forkk.net> | 2013-12-01 14:27:36 -0600 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-12-01 14:27:36 -0600 |
commit | 2427ad687137bbcfc7303a931d7e0b74d5325e48 (patch) | |
tree | 41eba6ced45761278f137eaf86b0f1da3c60996c /CMakeLists.txt | |
parent | eff38858ef32239cd91044295ce7db3def857339 (diff) | |
download | MultiMC-2427ad687137bbcfc7303a931d7e0b74d5325e48.tar MultiMC-2427ad687137bbcfc7303a931d7e0b74d5325e48.tar.gz MultiMC-2427ad687137bbcfc7303a931d7e0b74d5325e48.tar.lz MultiMC-2427ad687137bbcfc7303a931d7e0b74d5325e48.tar.xz MultiMC-2427ad687137bbcfc7303a931d7e0b74d5325e48.zip |
Rework MultiMC's versioning system
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dfce1fad..f3cacbe2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,16 +91,29 @@ ENDIF(${BIGENDIAN}) ######## Set version numbers ######## -SET(MultiMC_VERSION_MAJOR 5) +SET(MultiMC_VERSION_MAJOR 1) SET(MultiMC_VERSION_MINOR 0) -SET(MultiMC_VERSION_REV 0) # Build number -SET(MultiMC_VERSION_BUILD 0 CACHE STRING "Build number.") -MESSAGE(STATUS "MultiMC build #${MultiMC_VERSION_BUILD}") +SET(MultiMC_VERSION_BUILD -1 CACHE STRING "Build number. -1 for no build number.") + +# Build type +SET(MultiMC_VERSION_BUILD_TYPE "custombuild" CACHE STRING "Build type. Usually corresponds to the buildbot build name. Empty string for no build type.") + +SET(MultiMC_VERSION_STRING "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}") + +IF (MultiMC_VERSION_BUILD GREATER -1) + SET(MultiMC_VERSION_STRING "${MultiMC_VERSION_STRING}.${MultiMC_VERSION_BUILD}") +ENDIF () + +IF (NOT MultiMC_VERSION_BUILD_TYPE STREQUAL "") + SET(MultiMC_VERSION_STRING "${MultiMC_VERSION_STRING}-${MultiMC_VERSION_BUILD_TYPE}") +ENDIF () + +MESSAGE(STATUS "MultiMC 5 version ${MultiMC_VERSION_STRING}") # Custom target to just print the version. -ADD_CUSTOM_TARGET(version echo "Version: ${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}.${MultiMC_VERSION_REV}.${MultiMC_VERSION_BUILD}") +ADD_CUSTOM_TARGET(version echo "Version: ${MultiMC_VERSION_STRING}") # Check the current Git commit execute_process(COMMAND git rev-parse HEAD |