@@ -15,20 +15,20 @@ $PackageRepositoryUri = "https://repo1.maven.org/maven2"
1515function Get-AllPackageInfoFromRepo ([string ]$serviceDirectory = $null ) {
1616 $SdkType = $Env: SdkType
1717 if ($SdkType ) {
18- Write-Host " SdkType env var was set to '$SdkType '"
18+ Write-Verbose " SdkType env var was set to '$SdkType '"
1919 } else {
2020 $SdkType = " client"
21- Write-Host " SdkType env var was not set, default to 'client'"
21+ Write-Verbose " SdkType env var was not set, default to 'client'"
2222 }
23- Write-Host " Processing SdkType=$SdkType "
23+ Write-Verbose " Processing SdkType=$SdkType "
2424
2525 $allPackageProps = @ ()
2626 $sdkRoot = Join-Path $RepoRoot " sdk"
2727 $ymlFiles = @ ()
2828
2929 if ($serviceDirectory ) {
3030 $searchPath = Join-Path $sdkRoot $serviceDirectory
31- Write-Host " searchPath=$searchPath "
31+ Write-Verbose " searchPath=$searchPath "
3232 [array ]$ymlFiles = Get-ChildItem - Path $searchPath " ci*.yml" | Where-Object { $_.PSIsContainer -eq $false }
3333 } else {
3434 # The reason for the exclude folders are POM only releases (nothing is built) or
@@ -56,7 +56,7 @@ function Get-AllPackageInfoFromRepo([string]$serviceDirectory = $null) {
5656 # 6a. If #5 has a match, create the PackageProp and add it to the list
5757 # 6b. If #5 doesn't have a match, then skip it. This is the case where it's either
5858 # an AdditionalModule or something from another track.
59- Write-Host " Processing $ymlFile "
59+ Write-Verbose " Processing $ymlFile "
6060 $ymlFileContent = LoadFrom- Yaml $ymlFile
6161 $YmlFileSdkType = GetValueSafelyFrom- Yaml $ymlFileContent @ (" extends" , " parameters" , " SDKType" )
6262 $ymlDir = Split-Path - Path $ymlFile - Parent
@@ -65,7 +65,7 @@ function Get-AllPackageInfoFromRepo([string]$serviceDirectory = $null) {
6565 $YmlFileSdkType = " client"
6666 }
6767 if ($YmlFileSdkType -ne $SdkType ) {
68- Write-Host " SdkType in yml file is '$YmlFileSdkType ' which is not '$SdkType ', skipping..."
68+ Write-Verbose " SdkType in yml file is '$YmlFileSdkType ' which is not '$SdkType ', skipping..."
6969 continue
7070 }
7171 # ServiceDirectory
@@ -125,17 +125,17 @@ function Get-AllPackageInfoFromRepo([string]$serviceDirectory = $null) {
125125 $xmlPomFile.Load ($pomFile )
126126
127127 if ($xmlPomFile.project.psobject.properties.name -notcontains " artifactId" -or ! $xmlPomFile.project.artifactId ) {
128- Write-Host " $pomFile doesn't have a defined artifactId so skipping this pom."
128+ Write-Verbose " $pomFile doesn't have a defined artifactId so skipping this pom."
129129 continue
130130 }
131131
132132 if ($xmlPomFile.project.psobject.properties.name -notcontains " version" -or ! $xmlPomFile.project.version ) {
133- Write-Host " $pomFile doesn't have a defined version so skipping this pom."
133+ Write-Verbose " $pomFile doesn't have a defined version so skipping this pom."
134134 continue
135135 }
136136
137137 if ($xmlPomFile.project.psobject.properties.name -notcontains " groupid" -or ! $xmlPomFile.project.groupId ) {
138- Write-Host " $pomFile doesn't have a defined groupId so skipping this pom."
138+ Write-Verbose " $pomFile doesn't have a defined groupId so skipping this pom."
139139 continue
140140 }
141141
@@ -145,7 +145,7 @@ function Get-AllPackageInfoFromRepo([string]$serviceDirectory = $null) {
145145 $keyFromPom = " $ ( $xmlPomFile.project.groupId ) :$ ( $xmlPomFile.project.artifactId ) "
146146 if (-not $ArtifactsHashSet.Contains ($keyFromPom ))
147147 {
148- Write-Host " $ymlFile does not contain $ ( $xmlPomFile.project.groupId ) :$ ( $xmlPomFile.project.artifactId ) , skipping"
148+ Write-Verbose " $ymlFile does not contain $ ( $xmlPomFile.project.groupId ) :$ ( $xmlPomFile.project.artifactId ) , skipping"
149149 continue
150150 }
151151 # At this point everything is valid
@@ -474,7 +474,7 @@ function GetExistingPackageVersions ($PackageName, $GroupId=$null)
474474 $response = (Invoke-RestMethod - Method GET - Uri $Uri ).response
475475 if ($response.numFound -ne 0 )
476476 {
477- $existingVersion = $response.docs.v
477+ $existingVersion = @ ( $response.docs.v )
478478 if ($existingVersion.Count -gt 0 )
479479 {
480480 [Array ]::Reverse($existingVersion )
0 commit comments