Skip to content

Commit 7cd811d

Browse files
Sync eng/common directory with azure-sdk-tools for PR 2417 (Azure#22113)
* Add logic for retrieving package infro from DevOps feed * Add template for docwarden * Remove Invoke-DevOpsAPI changes * Update verify readme logic Co-authored-by: Chidozie Ononiwu <[email protected]>
1 parent 72a3286 commit 7cd811d

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
parameters:
2+
ScanPath: $(Build.SourcesDirectory)
3+
RepoRoot: $(Build.SourcesDirectory)
4+
SettingsPath: '$(Build.SourcesDirectory)/eng/.docsettings.yml'
5+
DocWardenVersion : '0.7.2'
6+
7+
steps:
8+
- task: PowerShell@2
9+
displayName: "Verify Readmes"
10+
inputs:
11+
filePath: "eng/common/scripts/Verify-Readme.ps1"
12+
arguments: >
13+
-DocWardenVersion ${{ parameters.DocWardenVersion }}
14+
-ScanPath ${{ parameters.ScanPath }}
15+
-RepoRoot ${{ parameters.RepoRoot }}
16+
-SettingsPath ${{ parameters.SettingsPath }}
17+
pwsh: true
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
# Wrapper Script for Readme Verification
22
[CmdletBinding()]
33
param (
4-
[string]$DocWardenVersion = "0.7.1",
5-
4+
[Parameter(Mandatory = $true)]
5+
[string]$DocWardenVersion,
66
[Parameter(Mandatory = $true)]
77
[string]$ScanPath,
8-
8+
[string]$RepoRoot,
99
[Parameter(Mandatory = $true)]
1010
[string]$SettingsPath
1111
)
1212

1313
pip install setuptools wheel --quiet
1414
pip install doc-warden==$DocWardenVersion --quiet
15-
ward scan -d $ScanPath -c $SettingsPath
15+
16+
if ($RepoRoot)
17+
{
18+
ward scan -d $ScanPath -u $RepoRoot -c $SettingsPath
19+
}
20+
else
21+
{
22+
ward scan -d $ScanPath -c $SettingsPath
23+
}
24+

0 commit comments

Comments
 (0)