Skip to content

Commit

Permalink
fixup! Cleanup git status before calling TranslationApp
Browse files Browse the repository at this point in the history
Review comments
  • Loading branch information
mstv authored and RussKie committed Apr 28, 2020
1 parent baeb49e commit dc89d30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
9 changes: 4 additions & 5 deletions appveyor.experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ build_script:
& .\scripts\Mark-RepoClean.ps1
}
# if building a temporary merge with master, reset the git revision to the HEAD of the PR, keeping the files of the merge of course
# 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
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" --
Expand All @@ -70,8 +70,7 @@ build_script:
& .\cibuild.cmd -restore -build -buildNative -logFileName build.binlog
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# for pull-requests we get merge-commits, and we reset to the actual PR commit, for the build contains the correct hash
# to verify the localisation was done correctly we don't need the original hash, so reset it back
# if we have reset above we need to reset English xlfs, otherwise the loc verification step will fail
# refer to https://github.com/gitextensions/gitextensions/issues/7979
if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT) {
git reset $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT --quiet -- "GitUI/Translation/English.xlf" "GitUI/Translation/English.Plugins.xlf"
Expand Down Expand Up @@ -107,8 +106,8 @@ test_script:
Write-Host ""
Write-Host "[INFO]: Test Run ${testRun}/${testRunCount}${failedBefore}"
if ($runUnitTests -ne 0) { & .\cibuild.cmd -test -logFileName UnitTest.binlog /p:NoBuild=true }
if ($runIntegrationTests -ne 0) { & .\cibuild.cmd -integrationTest -logFileName IntegrationTest.binlog /p:NoBuild=true }
if ($runUnitTests -ne 0) { & .\cibuild.cmd /p:NoBuild=true -test -logFileName UnitTest.binlog }
if ($runIntegrationTests -ne 0) { & .\cibuild.cmd /p:NoBuild=true -integrationTest -logFileName IntegrationTest.binlog }
Get-ChildItem -recurse artifacts\tests\TestResult.xml -ErrorAction SilentlyContinue `
| ForEach-Object {
Expand Down
9 changes: 4 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ build_script:
& .\scripts\Mark-RepoClean.ps1
}
# if building a temporary merge with master, reset the git revision to the HEAD of the PR, keeping the files of the merge of course
# 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
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" --
Expand All @@ -50,8 +50,7 @@ build_script:
& .\cibuild.cmd -restore -build -buildNative -logFileName build.binlog
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# for pull-requests we get merge-commits, and we reset to the actual PR commit, for the build contains the correct hash
# to verify the localisation was done correctly we don't need the original hash, so reset it back
# if we have reset above we need to reset English xlfs, otherwise the loc verification step will fail
# refer to https://github.com/gitextensions/gitextensions/issues/7979
if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT) {
git reset $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT --quiet -- "GitUI/Translation/English.xlf" "GitUI/Translation/English.Plugins.xlf"
Expand All @@ -68,9 +67,9 @@ build_script:
# to run your custom scripts instead of automatic tests
test_script:
- ps: |
& .\cibuild.cmd -test -logFileName UnitTest.binlog /p:NoBuild=true
& .\cibuild.cmd /p:NoBuild=true -test -logFileName UnitTest.binlog
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
& .\cibuild.cmd -integrationTest -logFileName IntegrationTest.binlog /p:NoBuild=true
& .\cibuild.cmd /p:NoBuild=true -integrationTest -logFileName IntegrationTest.binlog
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
Expand Down

0 comments on commit dc89d30

Please sign in to comment.