forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <chononiw@microsoft.com>
- Loading branch information
1 parent
72a3286
commit 7cd811d
Showing
2 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
|