@ -48,7 +48,7 @@ install:
- cmd : git submodule update --init --recursive
- cmd : |-
cd scripts
C:\\Python35 \\python set_version_to.py -v %APPVEYOR_BUILD_VERSION% -t %APPVEYOR_BUILD_VERSION%
C:\\Python311 \\python set_version_to.py -v %APPVEYOR_BUILD_VERSION% -t %APPVEYOR_BUILD_VERSION%
cd ..
git --version
@ -56,35 +56,28 @@ install:
# to run your custom scripts instead of automatic MSBuild
build_script:
- ps : |
$isBuildingPR = $false;
# if building a temporary merge with master, soft reset to the PR commit so the build contains the PR's hash instead of the merge-commit's hash
$buildArgs = '/p:ContinuousIntegrationBuild=true'
# if building a PR override the hash with the PR commit's so the build contains the PR's hash instead of the merge-commit's hash
if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -and ($env:APPVEYOR_REPO_COMMIT -ne $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT))
{
git reset --soft "$env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT" --
$isBuildingPR = $true;
$gitCommit = $(git rev-parse --short $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT)
$buildArgs += " /p:GitCommit=$gitCommit /p:GitSha=$($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT)"
}
- ps : |
# add to index, to adjust crlf configured in .gitattributes
git -c core.autocrlf=false add -A
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
- ps : |
# build VC++
dotnet build .\scripts\native.proj -c Release --verbosity q --nologo /bl:.\artifacts\log\native.binlog
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
- ps : |
# build .NET
dotnet build -c Release --verbosity q --nologo /bl:.\artifacts\log\build.binlog /p:ContinuousIntegrationBuild=true
$cmd = "dotnet build -c Release --verbosity q --nologo /bl:.\artifacts\log\build.binlog $buildArgs"
Invoke-Expression $cmd
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
- ps : |
# if we have reset above, we need to restore the merge commit, otherwise the loc verification step will fail
# there is no need to have the same commit hash, but there must be no pending changes before the loc verification
# refer to https://github.com/gitextensions/gitextensions/issues/7979
if ($isBuildingPR) {
git config user.email "gitextensions@github.com"
git config user.name "Git Extensions"
git -c core.autocrlf=false commit -a -m "restore merge commit" | Out-Null
# ignore warning about line-endings conversion
$global:LASTEXITCODE = 0
}
- ps : |
# Verify that new strings (if any) have been processed and ready for localisation
# it would be nice to run '.\cibuild.cmd -loc -logFileName localise.binlog /p:NoBuild=true' but it doesn't work without `-build` switch :\
Push-Location .\GitExtensions
dotnet msbuild /p:Configuration=Release /t:_UpdateEnglishTranslations /p:RunTranslationApp=true /p:ContinuousIntegrationBuild=true /v:m /bl:..\artifacts\log\localise.binlog
Pop-Location
@ -100,7 +93,8 @@ test_script:
after_test:
- ps : |
Write-Host "Preparing build artifacts..."
dotnet publish -c Release --no-build /bl:.\artifacts\log\publish.binlog /p:ContinuousIntegrationBuild=true
$cmd = "dotnet publish -c Release --no-build /bl:.\artifacts\log\publish.binlog $buildArgs"
Invoke-Expression $cmd
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
- ps : |
if ([bool]$env:APPVEYOR_PULL_REQUEST_TITLE -and [bool]$env:ARTIFACT_PUBLISH_PULL_REQUEST_MSI) {