-
Notifications
You must be signed in to change notification settings - Fork 29
/
azure-pipelines.yml
69 lines (56 loc) · 2.07 KB
/
azure-pipelines.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
61
62
63
64
65
66
67
68
69
trigger:
- master
- release/*
- refs/tags/*
pool: Build
steps:
- checkout: self
clean: true
- powershell: |
$majorMinor,$prerelease = Get-Content "major.minor"
$version = "$majorMinor.$(Get-Date -UFormat "%y")$("{0:D3}" -f (Get-Date).DayofYear).$env:BUILD_BUILDID"
$date = Get-Date -format dd.MM.yyyy
(Get-Content cover.html).replace('[[VERSION]]', $version) | Set-Content cover.html
(Get-Content cover.html).replace('[[TODAY]]', $date) | Set-Content cover.html
displayName: 'Set version in cover page'
- task: NodeTool@0
inputs:
checkLatest: true
versionSpec: '>=12.x'
displayName: 'Install Node.js'
- script: 'npm install -g markdown-link-check'
displayName: 'Install markdown-link-check'
- powershell: |
Get-ChildItem -Path ".\doc\" -Filter "*.md" -Recurse | ForEach-Object {
$path = Resolve-Path -Path $_.FullName -Relative
if(!($path -match "\\\.[^\.\\]+")) {
markdown-link-check -c .\markdown-link-check.config.json -q $path
}
}
failOnStderr: true
errorActionPreference: continue
displayName: 'Check links'
- task: NuGetToolInstaller@0
displayName: 'Use NuGet'
- powershell: |
# The current latest version 0.12.5 contains a bug that prevents the creation of TOCs
# Specific version can be removed as soon as 0.12.6 is released
choco install wkhtmltopdf --version 0.12.4.20170325 --allow-downgrade -y
choco install docfx --version 2.41 -y
nuget install DocFx.Plugins.PlantUml -ExcludeVersion -OutputDirectory .
displayName: 'Install prerequisites'
- task: PowerShell@2
inputs:
filePath: 'set-chapter-numbers.ps1'
- powershell: |
Start-Process docfx -Wait -RedirectStandardError $(Build.ArtifactStagingDirectory)/docfx-err.log -RedirectStandardOutput $(Build.ArtifactStagingDirectory)/docfx-out.log
displayName: Run docfx
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: logs'
inputs:
ArtifactName: logs
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: documentation'
inputs:
PathtoPublish: '_site_pdf/'
ArtifactName: documentation