mirror of
https://github.com/jellyfin/jellyfin-desktop.git
synced 2026-10-26 16:45:24 +00:00
Use VERSION file for versioning
This commit is contained in:
1 parent
8281ee713d
commit
b3c85d959c
4 files changed
+18
-30
No files matched your search
+1
-1
@@ -13,7 +13,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "" FORCE)
|
||||
option(CHECK_FOR_UPDATES "Enable checking for new versions of Jellyfin" ON)
|
||||
option(OPENELEC "Make an OpenELEC build" OFF)
|
||||
option(LINUX_X11POWER "Enable non D-Bus screensaver management" OFF)
|
||||
option(USE_STATIC_MPVQT "Build MpvQt from bundled submodule instead of using system library" ON)
|
||||
option(USE_STATIC_MPVQT "Build MpvQt from bundled submodule instead of using system library" OFF)
|
||||
|
||||
if (NOT CHECK_FOR_UPDATES)
|
||||
add_definitions(-DDISABLE_UPDATE_CHECK)
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Jellyfin")
|
||||
set(CPACK_PACKAGE_VENDOR "Jellyfin")
|
||||
set(CPACK_PACKAGE_NAME "Jellyfin")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_NANO})
|
||||
string(REPLACE "." ";" VERSION_PARTS "${VERSION_BASE}")
|
||||
list(GET VERSION_PARTS 0 CPACK_PACKAGE_VERSION_MAJOR)
|
||||
list(GET VERSION_PARTS 1 CPACK_PACKAGE_VERSION_MINOR)
|
||||
list(GET VERSION_PARTS 2 CPACK_PACKAGE_VERSION_PATCH)
|
||||
|
||||
if(APPLE)
|
||||
set(CPACK_SYSTEM_NAME "macosx-x86_64")
|
||||
|
||||
@@ -1,33 +1,19 @@
|
||||
# Get the current date.
|
||||
# include(WebClientVariables)
|
||||
string(TIMESTAMP CURRENT_DATE "%Y-%m-%d")
|
||||
|
||||
# Get git revision version
|
||||
#include(GetGitRevisionDescription)
|
||||
#get_git_head_revision(REFSPEC FULL_GIT_REVISION)
|
||||
#if(FULL_GIT_REVISION STREQUAL "GITDIR-NOTFOUND")
|
||||
# set(GIT_REVISION "git")
|
||||
#else(FULL_GIT_REVISION STREQUAL "GITDIR-NOTFOUND")
|
||||
# string(SUBSTRING ${FULL_GIT_REVISION} 0 8 GIT_REVISION)
|
||||
#endif(FULL_GIT_REVISION STREQUAL "GITDIR-NOTFOUND")
|
||||
|
||||
# Get the build number if available
|
||||
if(DEFINED ENV{BUILD_NUMBER})
|
||||
set(VERSION_BUILD "$ENV{BUILD_NUMBER}")
|
||||
set(VERSION_BUILD_NR "$ENV{BUILD_NUMBER}")
|
||||
else()
|
||||
set(VERSION_BUILD "dev")
|
||||
set(VERSION_BUILD_NR "0")
|
||||
endif()
|
||||
|
||||
set(VERSION_MAJOR 1)
|
||||
set(VERSION_MINOR 12)
|
||||
set(VERSION_NANO 0)
|
||||
|
||||
option(UPGRADE_DEBUG "" OFF)
|
||||
|
||||
set(VERSION_STRING "1.12.0")
|
||||
set(VERSION_STRING_SHORT "1.12.0")
|
||||
set(CANONICAL_VERSION_STRING "1.12.0")
|
||||
# Read version from VERSION file
|
||||
file(READ "${CMAKE_SOURCE_DIR}/VERSION" VERSION_STRING)
|
||||
string(STRIP "${VERSION_STRING}" VERSION_STRING)
|
||||
|
||||
# Extract major.minor.patch for places that need it
|
||||
string(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" VERSION_BASE "${VERSION_STRING}")
|
||||
if(NOT VERSION_BASE)
|
||||
set(VERSION_BASE "0.0.0")
|
||||
endif()
|
||||
|
||||
set(VERSION_STRING_SHORT "${VERSION_BASE}")
|
||||
set(CANONICAL_VERSION_STRING "${VERSION_BASE}")
|
||||
|
||||
configure_file(src/core/Version.cpp.in src/core/Version.cpp)
|
||||
Reference in new issue
Block a user