@@ -18,54 +18,48 @@ libraries are com.azure.spring and their javadoc jars will be under that subdire
1818but azure-spring-data-cosmos' GroupId is com.azure and its javadoc jar will be under
1919com.azure.
2020
21- . PARAMETER ArtifactsList
22- The list of artifacts to gather namespaces for, this is only done for libraries that are
23- producing docs.
24- -ArtifactsList ('$(ArtifactsJson)' | ConvertFrom-Json)
21+ The ArtifactStagingDirectory
22+
2523#>
2624[CmdletBinding ()]
2725Param (
2826 [Parameter (Mandatory = $True )]
29- [string ] $ArtifactStagingDirectory ,
30- [Parameter (Mandatory = $true )]
31- [array ] $ArtifactsList
27+ [string ] $ArtifactStagingDirectory
3228)
3329
34- $ArtifactsList = $ArtifactsList | Where-Object -Not " skipPublishDocMs"
35-
3630. (Join-Path $PSScriptRoot " .." common scripts common.ps1)
3731
38- if (-not $ArtifactsList ) {
39- Write-Host " ArtifactsList is empty, nothing to process. This can happen if skipPublishDocMs is set to true for all libraries being built."
40- exit 0
41- }
42-
4332Write-Host " ArtifactStagingDirectory=$ArtifactStagingDirectory "
4433if (-not (Test-Path - Path $ArtifactStagingDirectory )) {
4534 LogError " ArtifactStagingDirectory '$ArtifactStagingDirectory ' does not exist."
4635 exit 1
4736}
4837
49- Write-Host " "
50- Write-Host " ArtifactsList:"
51- $ArtifactsList | Format-Table - Property GroupId, Name, ReleaseInBatch | Out-String | Write-Host
52-
5338$packageInfoDirectory = Join-Path $ArtifactStagingDirectory " PackageInfo"
5439
5540$foundError = $false
5641# At this point the packageInfo files should have been already been created.
57- # The only thing being done here is adding or updating namespaces for libraries
58- # that will be producing docs. This ArtifactsList is
59- foreach ($artifact in $ArtifactsList ) {
60- if ($artifact.ReleaseInBatch -eq $false ) {
61- Write-Host " Skipping $ ( $artifact.Name ) as it is not being released in this batch."
62- continue
63- }
42+ $packageInfoFiles = Get-ChildItem - Path $packageInfoDirectory - File - Filter " *.json"
6443
65- # Get the version from the packageInfo file
66- $packageInfoFile = Join-Path $packageInfoDirectory " $ ( $artifact.Name ) .json"
44+ foreach ($packageInfoFile in $packageInfoFiles ) {
6745 Write-Host " processing $ ( $packageInfoFile.FullName ) "
6846 $packageInfo = ConvertFrom-Json (Get-Content $packageInfoFile - Raw)
47+
48+ # ArtifactDetails will be null for AdditionalModules
49+ if ($packageInfo.ArtifactDetails ) {
50+ # If skipPublishDocMs isn't there, then by default docs are being published for that library
51+ if ($packageInfo.ArtifactDetails.PSobject.Properties.Name -contains " skipPublishDocMs" ) {
52+ # If skipPublishDocMs is there and it's true, then skip publishing
53+ if ($packageInfo.ArtifactDetails.skipPublishDocMs ) {
54+ Write-Host " Skipping DocsMS publishing for $ ( $packageInfo.Name ) . skipPublishDocMs is set to false."
55+ continue
56+ }
57+ }
58+ } else {
59+ Write-Host " Skipping DocsMS publishing for $ ( $packageInfo.Name ) . ArtifactDetails is null meaning this is an AdditionalModule"
60+ continue
61+ }
62+
6963 $version = $packageInfo.Version
7064 # If the dev version is set, use that. This will be set for nightly builds
7165 if ($packageInfo.DevVersion ) {
0 commit comments