Skip to content

Commit de5dd6f

Browse files
committed
move CI fix to appveyor clone_script
1 parent 7be2088 commit de5dd6f

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

Build.ps1

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,6 @@ function CreateNuGetPackage {
9393
CheckLastExitCode
9494
}
9595

96-
function LoadOpenApiBranchIfRequired {
97-
if ($env:APPVEYOR_REPO_BRANCH -eq "openapi") {
98-
git fetch origin openapi:openapi
99-
}
100-
}
101-
102-
LoadOpenApiBranchIfRequired
103-
10496
dotnet tool restore
10597
CheckLastExitCode
10698

appveyor.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@ for:
3737
services:
3838
- postgresql101
3939
# REF: https://github.com/docascode/docfx-seed/blob/master/appveyor.yml
40+
clone_script:
41+
- ps: |
42+
git clone --branch=$env:APPEVEYOR_REPO_BRANCH git@github.com:$env:APPEVEYOR_REPO_NAME.git $env:APPEVEYOR_BUILD_FOLDER
43+
git fetch -q origin +refs/pull/$env:APPEVEYOR_PULL_REQUEST_NUMBER/merge:
44+
git checkout -qf FETCH_HEAD
4045
before_build:
4146
- pwsh: |
42-
if (-Not $env:APPVEYOR_PULL_REQUEST_TITLE) {
47+
if (-Not $env:APPEVEYOR_PULL_REQUEST_TITLE) {
4348
# https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html
4449
git checkout $env:APPVEYOR_REPO_BRANCH -q
4550
}

0 commit comments

Comments
 (0)