Browse Source

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

pull/889/head
Hamish Coleman 3 years ago
parent
commit
ff88803f6d
  1. 6
      CMakeLists.txt
  2. 1
      VERSION
  3. 7
      autogen.sh

6
CMakeLists.txt

@ -6,7 +6,11 @@ SET(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# N2n release information # 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}) set(N2N_OSNAME ${CMAKE_SYSTEM_NAME})
execute_process( execute_process(
COMMAND git status COMMAND git status

1
VERSION

@ -0,0 +1 @@
3.1.0

7
autogen.sh

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

Loading…
Cancel
Save