Browse Source

Add Git describe validation

Validate the output CMake list for `git_output` is the right length

Signed-off-by: Emily Mabrey <emabrey@tenacityaudio.org>
pull/646/head
Emily Mabrey 2 months ago
parent
commit
13b2273a89
No known key found for this signature in database GPG Key ID: 6F4EF47256A1B7DC
  1. 10
      CMakeLists.txt

10
CMakeLists.txt

@ -97,9 +97,13 @@ if( GIT_FOUND )
string( REGEX REPLACE "-.*" "" git_output "${git_output}" )
string( REPLACE "." ";" git_output "${git_output}" )
list( GET git_output 0 AUDACITY_VERSION )
list( GET git_output 1 AUDACITY_RELEASE )
list( GET git_output 2 AUDACITY_REVISION )
list( LENGTH git_output GIT_OUTPUT_LIST_LENGTH )
if( GIT_OUTPUT_LIST_LENGTH GREATER_EQUAL 3 )
list( GET git_output 0 AUDACITY_VERSION )
list( GET git_output 1 AUDACITY_RELEASE )
list( GET git_output 2 AUDACITY_REVISION )
endif()
endif()
endif()

Loading…
Cancel
Save