forked from abdelbahgat/microsoft-graph-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
60 lines (37 loc) · 1.71 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
version: 1.0.{build}
clone_depth: 1
build_script:
- ps: nuget install MarkdownScanner.BinaryTools
test_script:
- ps: >-
$pkgfolder = Get-ChildItem -Directory | Where-Object {$_.name -match "MarkdownScanner.BinaryTools."}
$apidocs = $pkgfolder.name + "\tools\apidocs.exe"
# check links at the root of the repository
$parms = "check-links", "--appveyor-url", $env:APPVEYOR_API_URL, "--path", $env:APPVEYOR_BUILD_FOLDER, "--relax-string-validation", "--ignore-warnings"
& $apidocs $parms
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# check documents in each api reference set
$path = $env:APPVEYOR_BUILD_FOLDER + "\api-reference"
$reference_paths = [System.IO.Directory]::GetDirectories($path)
ForEach($reference in $reference_paths)
{
# if ([string]::IsNullOrEmpty($env:APPVEYOR_PULL_REQUEST_NUMBER))
{
# Run the checks on all files
$parms = "check-docs", "--appveyor-url", $env:APPVEYOR_API_URL, "--path", $reference, "--relax-string-validation", "--ignore-warnings"
}
#else
#{
# Run the checks only on files changed since the master branch
# $parms = "check-docs", "--appveyor-url", $env:APPVEYOR_API_URL, "--path", $reference, "--relax-string-validation", "--ignore-warnings", "--changes-since-branch-only", $env:APPVEYOR_REPO_BRANCH
#}
& $apidocs $parms
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
}
notifications:
- provider: Slack
incoming_webhook: https://hooks.slack.com/services/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
channel: '#build-status'
on_build_success: true
on_build_failure: true
on_build_status_changed: false