Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions eng/common/pipelines/templates/steps/verify-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
parameters:
ScanPath: $(Build.SourcesDirectory)
RepoRoot: $(Build.SourcesDirectory)
SettingsPath: '$(Build.SourcesDirectory)/eng/.docsettings.yml'
DocWardenVersion : '0.7.2'

steps:
- task: PowerShell@2
displayName: "Verify Readmes"
inputs:
filePath: "eng/common/scripts/Verify-Readme.ps1"
arguments: >
-DocWardenVersion ${{ parameters.DocWardenVersion }}
-ScanPath ${{ parameters.ScanPath }}
-RepoRoot ${{ parameters.RepoRoot }}
-SettingsPath ${{ parameters.SettingsPath }}
pwsh: true
17 changes: 13 additions & 4 deletions eng/common/scripts/Verify-Readme.ps1
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
# Wrapper Script for Readme Verification
[CmdletBinding()]
param (
[string]$DocWardenVersion = "0.7.1",

[Parameter(Mandatory = $true)]
[string]$DocWardenVersion,
[Parameter(Mandatory = $true)]
[string]$ScanPath,

[string]$RepoRoot,
[Parameter(Mandatory = $true)]
[string]$SettingsPath
)

pip install setuptools wheel --quiet
pip install doc-warden==$DocWardenVersion --quiet
ward scan -d $ScanPath -c $SettingsPath

if ($RepoRoot)
{
ward scan -d $ScanPath -u $RepoRoot -c $SettingsPath
}
else
{
ward scan -d $ScanPath -c $SettingsPath
}