diff --git a/.gitlab/coverity.yml b/.gitlab/coverity.yml index 6d9d59408a..ba2678fd6d 100644 --- a/.gitlab/coverity.yml +++ b/.gitlab/coverity.yml @@ -28,8 +28,8 @@ --form token=$COVERITY_SCAN_TOKEN \ --form email=$GITLAB_USER_EMAIL \ --form file=@cov-int.tar.gz \ - --form version="`git describe --tags`" \ - --form description="`git describe --tags` / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID " 2>&1 \ + --form version="`cat kicad_build_version.txt`" \ + --form description="`cat kicad_build_version.txt` / $CI_COMMIT_TITLE" 2>&1 \ | tee curl-response.txt grep -q 'Build successfully submitted' curl-response.txt @@ -47,6 +47,8 @@ Coverity: - cov-analysis-linux64.tgz before_script: - export COVERITY_SCAN_PROJECT_NAME="kicad" + - test "$(git rev-parse --is-shallow-repository)" = "false" || (git fetch --unshallow) + - git fetch origin script: - *coverity_cache_prep - cmake diff --git a/CMakeModules/WriteVersionHeader.cmake b/CMakeModules/WriteVersionHeader.cmake index 704bdf347f..b84d90eb78 100644 --- a/CMakeModules/WriteVersionHeader.cmake +++ b/CMakeModules/WriteVersionHeader.cmake @@ -73,6 +73,8 @@ if( _wvh_write_version_file ) file( WRITE ${OUTPUT_FILE} ${_wvh_new_version_text} ) + # Write a simple document with only the full version + file( WRITE ${TEXT_OUTPUT_FILE} "${KICAD_VERSION_FULL}" ) endif() # There should always be a valid version.h file. Otherwise, the build will fail. diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index cde69242b1..736e00b57b 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -144,6 +144,7 @@ add_custom_target( COMMAND ${CMAKE_COMMAND} -DKICAD_VERSION_EXTRA=${KICAD_VERSION_EXTRA} -DOUTPUT_FILE=${CMAKE_BINARY_DIR}/kicad_build_version.h + -DTEXT_OUTPUT_FILE=${CMAKE_BINARY_DIR}/kicad_build_version.txt -DSRC_PATH=${PROJECT_SOURCE_DIR} -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} -P ${CMAKE_MODULE_PATH}/WriteVersionHeader.cmake