diff --git a/eng/scripts/Invoke-GenerateAndBuildV2.ps1 b/eng/scripts/Invoke-GenerateAndBuildV2.ps1 index 50ab22aa9308d..47c61f9785adc 100644 --- a/eng/scripts/Invoke-GenerateAndBuildV2.ps1 +++ b/eng/scripts/Invoke-GenerateAndBuildV2.ps1 @@ -87,6 +87,7 @@ for ($i = 0; $i -le $readmeFiles.Count - 1; $i++) { $autorestConfigYaml = ConvertTo-YAML $yml } Invoke-GenerateAndBuildSDK -readmeAbsolutePath $readme -sdkRootPath $sdkPath -autorestConfigYaml "$autorestConfigYaml" -downloadUrlPrefix "$downloadUrlPrefix" -generatedSDKPackages $generatedSDKPackages + $generatedSDKPackages[$generatedSDKPackages.Count - 1]['readmeMd'] = @($readmeFile) } #update services without readme.md @@ -156,6 +157,7 @@ if ($relatedTypeSpecProjectFolder) { -generatedSDKPackages $generatedSDKPackages ` -specRepoRoot $swaggerDir } + $generatedSDKPackages[$generatedSDKPackages.Count - 1]['typespecProject'] = @($typespecRelativeFolder) } } $outputJson = [PSCustomObject]@{ diff --git a/eng/scripts/automation/GenerateAndBuildLib.ps1 b/eng/scripts/automation/GenerateAndBuildLib.ps1 index 5d0d78f46803e..58206af3573dd 100644 --- a/eng/scripts/automation/GenerateAndBuildLib.ps1 +++ b/eng/scripts/automation/GenerateAndBuildLib.ps1 @@ -891,7 +891,18 @@ function GeneratePackage() $ciFilePath = "sdk/$service/ci.mgmt.yml" } + # get the sdk version + $version = "" + $projectFile = Join-Path $srcPath "$packageName.csproj" + $csproj = new-object xml + $csproj.PreserveWhitespace = $true + $csproj.Load($projectFile) + $versionNode = ($csproj | Select-Xml "Project/PropertyGroup/Version").Node + if ($versionNode) { + $version = $versionNode.InnerText + } $packageDetails = @{ + version=$version; packageName="$packageName"; result=$result; path=@("$path", "$ciFilePath"); @@ -899,7 +910,7 @@ function GeneratePackage() artifacts=$artifacts; apiViewArtifact=$apiViewArtifact; language=".Net"; - changelog=$changelog + changelog=$changelog; } if ($null -ne $installInstructions) {