mirror of
https://github.com/glest/glest-source.git
synced 2025-08-29 19:00:07 +02:00
- updated windows coverity script to read from settings file
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
rem @echo off
|
@echo off
|
||||||
rem
|
rem
|
||||||
rem Upload Coverity s
|
rem Upload Coverity s
|
||||||
rem Requires:
|
rem Requires:
|
||||||
@@ -8,14 +8,33 @@ rem - ..\..\data\glest_game\7z.exe (should get installed automatically during a
|
|||||||
rem - Coverity Scan Build Tool installed and in %PATH%
|
rem - Coverity Scan Build Tool installed and in %PATH%
|
||||||
rem
|
rem
|
||||||
|
|
||||||
|
rem Change into this directory
|
||||||
|
cd /d "%~dp0"
|
||||||
|
|
||||||
rem Project name (case sensitive)
|
rem Project name (case sensitive)
|
||||||
set PROJECT=MegaGlest
|
set PROJECT=MegaGlest
|
||||||
|
|
||||||
|
rem read in config settings
|
||||||
|
if not exist ".coverity-submit" (
|
||||||
|
echo -----------------------------------------
|
||||||
|
echo **Missing Config** To use this script please create a config file named [%CD%\.coverity-submit]
|
||||||
|
echo Containing: TOKEN=x , EMAIL=x , COVERITY_ANALYSIS_ROOT=x , NUMCORES=x
|
||||||
|
goto END
|
||||||
|
)
|
||||||
|
|
||||||
|
setlocal disabledelayedexpansion
|
||||||
|
FOR /F "tokens=1* delims==" %%i IN (.coverity-submit) DO set "prop_%%i=%%j"
|
||||||
|
|
||||||
rem Coverity Scan project token as listed on the Coverity Scan project page
|
rem Coverity Scan project token as listed on the Coverity Scan project page
|
||||||
set TOKEN=FIXME
|
set TOKEN=%prop_TOKEN%
|
||||||
|
|
||||||
rem E-Mail address of registered Coverity Scan user with project access
|
rem E-Mail address of registered Coverity Scan user with project access
|
||||||
set EMAIL=FIXME
|
set EMAIL=%prop_EMAIL%
|
||||||
|
|
||||||
|
set COVERITY_ANALYSIS_ROOT=%prop_COVERITY_ANALYSIS_ROOT%
|
||||||
|
|
||||||
|
echo TOKEN [%TOKEN%] EMAIL [%EMAIL%] COVERITY_ANALYSIS_ROOT [%COVERITY_ANALYSIS_ROOT%]
|
||||||
|
rem pause
|
||||||
|
|
||||||
rem Description of this build (can be any string)
|
rem Description of this build (can be any string)
|
||||||
set DESCRIPTION=Windows-32_%COMPUTERNAME%
|
set DESCRIPTION=Windows-32_%COMPUTERNAME%
|
||||||
@@ -39,12 +58,19 @@ rem Untested! Requires modification.
|
|||||||
rem ..\..\data\glest_game\wget.exe --no-check-certificate https://scan.coverity.com/download/win-32 --post-data "token=%TOKEN%&project=%PROJECT%" -O %TEMP%\coverity_tool.zip
|
rem ..\..\data\glest_game\wget.exe --no-check-certificate https://scan.coverity.com/download/win-32 --post-data "token=%TOKEN%&project=%PROJECT%" -O %TEMP%\coverity_tool.zip
|
||||||
rem ..\..\data\glest_game\7z.exe x %TEMP%\coverity_tool.zip
|
rem ..\..\data\glest_game\7z.exe x %TEMP%\coverity_tool.zip
|
||||||
rem set PATH=%PATH%;C:\build\megaglest-source\mk\windoze\cov-analysis-win32-6.6.1\bin\
|
rem set PATH=%PATH%;C:\build\megaglest-source\mk\windoze\cov-analysis-win32-6.6.1\bin\
|
||||||
|
if "%MG_COV_PATH_SET%." == "." set PATH=%PATH%;%COVERITY_ANALYSIS_ROOT%\bin\
|
||||||
|
set MG_COV_PATH_SET=TRUE
|
||||||
|
|
||||||
cov-build --dir %BUILDTOOL% build-mg-2010.bat nopause rebuild
|
cov-build --dir %BUILDTOOL% build-mg-2010.bat nopause rebuild
|
||||||
|
if ERRORLEVEL 1 GOTO ERROR
|
||||||
|
|
||||||
..\..\data\glest_game\7z.exe a %FILENAME%.tar %BUILDTOOL%\
|
..\..\data\glest_game\7z.exe a %FILENAME%.tar %BUILDTOOL%\
|
||||||
..\..\data\glest_game\7z.exe a %FILENAME%.tar.gz %FILENAME%.tar
|
..\..\data\glest_game\7z.exe a %FILENAME%.tar.gz %FILENAME%.tar
|
||||||
del /Q /F %FILENAME%.tar
|
del /Q /F %FILENAME%.tar
|
||||||
|
dir %FILENAME%.tar.gz
|
||||||
|
|
||||||
|
Echo **About to run: ..\..\data\glest_game\curl.exe --insecure --form "project=%PROJECT%" --form "token=%TOKEN%" --form "email=%EMAIL%" --form "version=%VERSION%" --form "description=%DESCRIPTION%" --form "file=@%FILENAME%.tar.gz" https://scan5.coverity.com/cgi-bin/upload.py
|
||||||
|
rem pause
|
||||||
rem echo Running curl
|
rem echo Running curl
|
||||||
..\..\data\glest_game\curl.exe --insecure --form "project=%PROJECT%" --form "token=%TOKEN%" --form "email=%EMAIL%" --form "version=%VERSION%" --form "description=%DESCRIPTION%" --form "file=@%FILENAME%.tar.gz" https://scan5.coverity.com/cgi-bin/upload.py
|
..\..\data\glest_game\curl.exe --insecure --form "project=%PROJECT%" --form "token=%TOKEN%" --form "email=%EMAIL%" --form "version=%VERSION%" --form "description=%DESCRIPTION%" --form "file=@%FILENAME%.tar.gz" https://scan5.coverity.com/cgi-bin/upload.py
|
||||||
if ERRORLEVEL 1 GOTO ERROR
|
if ERRORLEVEL 1 GOTO ERROR
|
||||||
|
Reference in New Issue
Block a user