[Docs CI] Fix the *.xml file generation command (#4261)

* Fix the *.xml file generation command

* check the errorlevel of robocopy command
This commit is contained in:
georgechenchao 2017-08-19 02:44:22 +08:00 коммит произвёл Derek Bekoe
Родитель 72b58c0d3f
Коммит e4fae02ce9
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -41,7 +41,7 @@ build_script:
}
$fileCommitMap | ConvertTo-Json | Out-File "$env:APPVEYOR_BUILD_FOLDER\doc\sphinx\doc_commit_map.json"
- cd doc\sphinx
- make xml
- make xmlwithversion
- mkdir %TEMP%\azure-cli-xml2yml
- cd %TEMP%\azure-cli-xml2yml
- nuget install azure.cli.doc.xml2yml -Source https://ci.appveyor.com/nuget/azure-docs-cli-pre-process
@ -70,6 +70,6 @@ on_success:
}
}
- cd %TEMP%\azure-cli-content
- SETLOCAL EnableDelayedExpansion & robocopy %TEMP%\azure-cli-xml2yml\yml-output %TEMP%\azure-cli-content /e
- SETLOCAL EnableDelayedExpansion & robocopy %TEMP%\azure-cli-xml2yml\yml-output %TEMP%\azure-cli-content /e & IF !ERRORLEVEL! EQU 1 (exit 0) ELSE (IF !ERRORLEVEL! EQU 3 (exit 0) ELSE (exit 1))
- git add -A
- git diff --quiet --exit-code --cached || git commit -m "Update Document Content" && git push origin %TARGET_BRANCH% && appveyor AddMessage "Document Updated"