1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-03 17:39:25 +02:00

Add Git describe validation

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

Signed-off-by: Emily Mabrey <emabrey@tenacityaudio.org>
This commit is contained in:
Emily Mabrey 2021-09-27 01:19:24 -04:00
parent b8896742f8
commit 13b2273a89
No known key found for this signature in database
GPG Key ID: 6F4EF47256A1B7DC

View File

@ -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()