Use one common file for the version number in both build systems

This commit is contained in:
Hamish Coleman 2021-11-01 08:39:42 +00:00
parent 81bd79a82a
commit ff88803f6d
3 changed files with 7 additions and 7 deletions

View File

@ -6,7 +6,11 @@ SET(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# N2n release information
set(N2N_VERSION "3.1.0")
execute_process(
COMMAND cat VERSION
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE N2N_VERSION
)
set(N2N_OSNAME ${CMAKE_SYSTEM_NAME})
execute_process(
COMMAND git status

1
VERSION Normal file
View File

@ -0,0 +1 @@
3.1.0

View File

@ -1,11 +1,6 @@
#!/usr/bin/env bash
# NOTE: update version in CMakeLists.txt after changing these
N2N_MAJOR="3"
N2N_MINOR="1"
N2N_PATCH="0"
N2N_VERSION_SHORT="$N2N_MAJOR.$N2N_MINOR.$N2N_PATCH"
N2N_VERSION_SHORT=$(cat VERSION)
cat configure.seed | sed \
-e "s/@N2N_VERSION_SHORT@/$N2N_VERSION_SHORT/g" \