Make Coverity use the main KiCad version string

Also create a kicad_build_version.txt file in the build directory
that only contains the version string.
This commit is contained in:
Ian McInerney 2020-07-21 23:13:58 +01:00
parent fd647a1fa9
commit 9997c46ee4
3 changed files with 7 additions and 2 deletions

View File

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

View File

@ -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.

View File

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