Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/elfmz/far2l.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelfmz <fenix1905@tut.by>2021-04-25 23:14:58 +0300
committerelfmz <fenix1905@tut.by>2021-04-26 00:25:59 +0300
commit01975f15f21fc13aa85f0129794567627e6b6994 (patch)
tree1ed2dedc93d0d50382065dfbd182fa102eb2ef3f
parent7eb14e56ec589621dbdc03842f7cdafb5d4592ca (diff)
cmake: set patch version component to git revisionv2021-04-26_alpha
-rw-r--r--CMakeLists.txt15
-rw-r--r--packaging/osx/FixupBundle.cmake2
2 files changed, 14 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 68e7ae66..603346f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,7 +9,18 @@ set(APP_IDENTIFIER "com.far2l")
set(CPACK_PACKAGE_NAME "far2l")
set(VERSION_MAJOR 2)
set(VERSION_MINOR 3)
-set(VERSION_PATCH 0)
+
+execute_process(COMMAND sh -c
+ "cd ${CMAKE_SOURCE_DIR} && git log -1 --date=format:'%y%m%d' --format=%cd_%h"
+ OUTPUT_VARIABLE VERSION_PATCH)
+
+string(REGEX REPLACE "[\r\n\t ]$" "" VERSION_PATCH "${VERSION_PATCH}")
+
+if("${VERSION_PATCH}" STREQUAL "")
+ set(VERSION_PATCH "alpha")
+else()
+ set(VERSION_PATCH "${VERSION_PATCH}_alpha")
+endif()
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
@@ -26,7 +37,7 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
-message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
+message(STATUS "Build Type: ${CMAKE_BUILD_TYPE} Version: ${VERSION}")
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
diff --git a/packaging/osx/FixupBundle.cmake b/packaging/osx/FixupBundle.cmake
index 28a5a6a9..b280ad72 100644
--- a/packaging/osx/FixupBundle.cmake
+++ b/packaging/osx/FixupBundle.cmake
@@ -6,7 +6,7 @@ include(BundleUtilities)
# STEP 1: manually find and fixup plugins files
set(BU_CHMOD_BUNDLE_ITEMS TRUE)
-set(APP_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/far2l.app")
+set(APP_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/@APP_NAME@.app")
file(GLOB_RECURSE PLUGINS "${APP_INSTALL_DIR}/**/*.far-plug*")
fixup_bundle("${APP_INSTALL_DIR}" "${PLUGINS}" "" IGNORE_ITEM "python;python3;python3.8;Python;.Python")