diff --git a/scripts/build-appveyor.bat b/scripts/build-appveyor.bat index ecbc2c048..40018710c 100644 --- a/scripts/build-appveyor.bat +++ b/scripts/build-appveyor.bat @@ -5,10 +5,16 @@ SET EL=0 ECHO =========== %~f0 =========== ECHO NUMBER_OF_PROCESSORS^: %NUMBER_OF_PROCESSORS% -ECHO RAM [MB]: -powershell "get-ciminstance -class 'cim_physicalmemory' | % {$_.Capacity / 1024 / 1024}" +ECHO RAM [MB]^: +powershell "get-ciminstance -class 'cim_physicalmemory' | %% { $_.Capacity/1024/1024}" IF %ERRORLEVEL% NEQ 0 GOTO ERROR +::only build on AppVeyor, if explicitly stated +ECHO APPVEYOR_REPO_COMMIT_MESSAGE^: %APPVEYOR_REPO_COMMIT_MESSAGE% +SET BUILD_ON_APPVEYOR=0 +for /F "tokens=1 usebackq" %%i in (`powershell .\scripts\parse-commit-message.ps1 '[build appveyor]'`) DO SET BUILD_ON_APPVEYOR=%%i +IF %BUILD_ON_APPVEYOR% EQU 0 ECHO not building, commit with [build appveyor] && GOTO DONE + SET BUILD_TYPE=%configuration% SET BUILDPLATFORM=%platform% SET TOOLS_VERSION=%msvs_toolset%.0 diff --git a/scripts/build-local.bat b/scripts/build-local.bat index 908161f67..0941dacef 100644 --- a/scripts/build-local.bat +++ b/scripts/build-local.bat @@ -4,6 +4,8 @@ SET EL=0 ECHO =========== %~f0 =========== +SET APPVEYOR_REPO_COMMIT_MESSAGE=das ist ein test + SET MAPNIK_GIT=3.0.5 SET BOOST_VERSION=58 SET FASTBUILD=1 diff --git a/scripts/parse-commit-message.ps1 b/scripts/parse-commit-message.ps1 new file mode 100644 index 000000000..a22c10d96 --- /dev/null +++ b/scripts/parse-commit-message.ps1 @@ -0,0 +1,5 @@ +if($env:APPVEYOR_REPO_COMMIT_MESSAGE.ToLower().Contains($args[0].ToLower())) { + Write-Host '1'; +} else { + Write-Host '0'; +}