Skip to content

Commit 32bba31

Browse files
committed
Fix doc generation bugs in AppVeyor
1 parent 4c87219 commit 32bba31

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

.appveyor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ branches:
99
- /^feature\/.*/
1010
build_script:
1111
- ps: .\build.ps1 -IsOfficialBuild
12-
- ps: .\docs\generate.ps1 -NoBuild
13-
on_success:
14-
- ps: .\docs\push.ps1 -AppVeyor
12+
- ps: .\docs\generate.ps1 -NoBuild -Verbose
1513
environment:
1614
access_token:
1715
secure: 7gza5cyC0Fwp5LcFPz9dGMcHXP2jxbrnu7er9R/HkdvnhzGJVADvOtfYO7+Vow5p
@@ -24,6 +22,8 @@ artifacts:
2422
- path: 'artifacts\*.nupkg'
2523
name: Packages
2624
type: NuGetPackages
25+
after_deploy:
26+
- ps: .\docs\push.ps1 -AppVeyor
2727
deploy:
2828
- provider: NuGet
2929
name: myget

docs/.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/generate.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ try {
1414

1515
$buildRoot = "$PSScriptRoot/../.build/docs"
1616
$targetDir = "$buildRoot/gh-pages"
17-
New-Item -ItemType Directory $buildRoot -ErrorAction Ignore
17+
mkdir -p $buildRoot -ErrorAction Ignore | Out-Null
1818

1919
if (-not (git worktree list --porcelain | Select-String 'gh-pages')) {
20-
& git fetch origin gh-pages
21-
& git worktree add $targetDir gh-pages
20+
exec git fetch --quiet origin gh-pages:gh-pages
21+
exec git worktree add $targetDir gh-pages
2222
}
2323

2424
$docfxVersion = '2.33.2'
@@ -33,7 +33,7 @@ try {
3333
}
3434

3535
Push-Location $targetDir
36-
& git rm --quiet --force -r .
36+
exec git rm --quiet --force -r .
3737
Pop-Location
3838

3939
if (-not $NoBuild) {
@@ -50,6 +50,7 @@ try {
5050
finally {
5151
Push-Location $targetDir
5252
& git add ./
53+
Write-Host "Files that changed in docs:"
5354
& git --no-pager status -s
5455
Pop-Location
5556
}

src/common.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function exec([string]$_cmd) {
22
write-host -ForegroundColor DarkGray ">>> $_cmd $args"
33
$ErrorActionPreference = 'Continue'
4-
& $_cmd @args
4+
& $_cmd @args 2>&1
55
$ErrorActionPreference = 'Stop'
66
if ($LASTEXITCODE -ne 0) {
77
write-error "Failed with exit code $LASTEXITCODE"

0 commit comments

Comments
 (0)