forked from fiskaltrust/interface-doc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
72 lines (58 loc) · 2.21 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
70
71
72
trigger:
- master
- release/*
queue:
name: windows-2019
steps:
- 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'
- powershell: |
$i = 0
Get-Content .\doc\toc.md | ForEach-Object {
$success = $_ -match "#\s*\[(.*?)\]\((?<filename>.*?)\)"
if ($success) {
$path = Join-Path "doc" $matches['filename']
"<style>body {counter-reset: h1 $i}</style>`n" + (Get-Content $path -Raw) | Set-Content $path
$i++;
}
}
displayName: 'Set chapter header counters'
- task: NodeTool@0
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js'
- script: 'npm install -g markdown-link-check'
displayName: 'Install markdown-link-check'
- task: PowerShell@1
displayName: 'Check links'
inputs:
scriptName: 'scripts/MarkdownLinkCheck.ps1'
workingFolder: scripts'
- 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
displayName: 'Install wkhtmltopdf'
- task: NuGetToolInstaller@0
displayName: 'Use NuGet'
- powershell: |
nuget install DocFx.Plugins.PlantUml -ExcludeVersion -OutputDirectory .
displayName: 'Install PlantUml Plugin'
- powershell: |
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install docfx --version 2.40.7 --allow-downgrade -y
docfx
# - task: chrismason.vsts-docfxtasks.docfx-extension-build-task.DocFxTask@0
# displayName: 'Create DocFx Documentation'
# inputs:
# solution: docfx.json
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: documentation'
inputs:
PathtoPublish: '_site_pdf/'
ArtifactName: documentation