From 4b434a21bddd5500c39fa926ee2c48f4f3d89a67 Mon Sep 17 00:00:00 2001 From: Filip Szweda <68189467+filip-szweda@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:58:27 +0200 Subject: [PATCH] Remove version.properties and CHANGELOG.md (#18) --- CHANGELOG.md | 3 --- CMakeLists.txt | 8 ++++++-- thirdparty/CMakeLists.txt | 1 - version.properties | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) delete mode 100644 CHANGELOG.md delete mode 100644 version.properties diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 485a42f7..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.0 (19.09.2023) - -* Initial release \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e59bd73..ffeabfee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,8 +35,12 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release") set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) endif() -file(READ "version.properties" ver) -string(REGEX MATCH "version=([0-9]+)\.([0-9]+)\.([0-9]+)" _ ${ver}) +find_package(Git REQUIRED) +execute_process( + COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=0 OUTPUT_VARIABLE ver +) + +string(REGEX MATCH "([0-9]+)\.([0-9]+)\.([0-9]+)" _ ${ver}) if(NOT CMAKE_MATCH_COUNT EQUAL 3) message(FATAL_ERROR "Version parsing failed\n Got: ${ver}") endif() diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 61e5e293..cde77cc8 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -3,7 +3,6 @@ project(thirdparty) set(THIRDPARTY_MAKE_JOBS_COUNT "1" CACHE STRING "Number of jobs to use when compiling thirdparty submodules") include(ExternalProject) -find_package(Git REQUIRED) if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/bpftool/src/Makefile OR NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/bpftool/libbpf/src/Makefile) execute_process( diff --git a/version.properties b/version.properties deleted file mode 100644 index de55ab65..00000000 --- a/version.properties +++ /dev/null @@ -1 +0,0 @@ -version=0.1.0