Initial commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$root = Split-Path $PSScriptRoot -Parent
|
||||
$forbiddenDirectories = @('auth', 'iam', 'order', 'firstleg', 'common-core', 'common-web',
|
||||
'common-security', 'common-openapi', 'common-audit', 'common-event-contract')
|
||||
|
||||
foreach ($directory in $forbiddenDirectories) {
|
||||
if (Test-Path (Join-Path $root $directory)) {
|
||||
throw "FORBIDDEN_DIRECTORY: $directory"
|
||||
}
|
||||
}
|
||||
|
||||
$pomFiles = Get-ChildItem -Path $root -Recurse -Filter pom.xml
|
||||
foreach ($pom in $pomFiles) {
|
||||
$document = New-Object System.Xml.XmlDocument
|
||||
$document.Load($pom.FullName)
|
||||
}
|
||||
|
||||
$excluded = Get-ChildItem -Path $root -Recurse -Directory |
|
||||
Where-Object { $_.Name -in @('.git', '.idea', 'target') }
|
||||
if ($excluded) {
|
||||
throw "EXCLUDED_DIRECTORY: $($excluded.FullName -join ',')"
|
||||
}
|
||||
|
||||
Write-Host "BOUNDARY_AND_POM_XML_OK"
|
||||
Reference in New Issue
Block a user