Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 3480 (#2258)
Browse files Browse the repository at this point in the history
* Check file case duplication

* Save changes

Co-authored-by: sizhu <[email protected]>
  • Loading branch information
azure-sdk and sima-zhu authored Jul 7, 2022
1 parent a1ec07b commit 91f1c23
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions eng/common/pipelines/templates/steps/validate-filename.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
parameters:
WorkingDirectory: '$(System.DefaultWorkingDirectory)'
steps:
- pwsh: |
$differByCaseFiles = git ls-files | Group-Object | Where-Object { $_.Count -gt 1 }
if ($differByCaseFiles)
{
foreach ($fileGroup in $differByCaseFiles) {
Write-Host "Duplicated Files: "
Write-Host "[ $($fileGroup.Group) ]"
}
Write-Host "Do NOT name the files which only differ in case. Please check above files."
exit 1
}
Write-Host "There are no file names that only differ in case."
displayName: Check file case duplicates
workingDirectory: ${{ parameters.WorkingDirectory }}

0 comments on commit 91f1c23

Please sign in to comment.