Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync eng/common directory with azure-sdk-tools for PR 9326 #47162

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/common/scripts/Cadl-Project-Generate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ param (
$ErrorActionPreference = "Stop"
. $PSScriptRoot/Helpers/PSModule-Helpers.ps1
. $PSScriptRoot/common.ps1
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module

function NpmInstallForProject([string]$workingDirectory) {
Push-Location $workingDirectory
Expand Down
2 changes: 1 addition & 1 deletion eng/common/scripts/Cadl-Project-Sync.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ param (

$ErrorActionPreference = "Stop"
. $PSScriptRoot/Helpers/PSModule-Helpers.ps1
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module
$sparseCheckoutFile = ".git/info/sparse-checkout"

function AddSparseCheckoutPath([string]$subDirectory) {
Expand Down
2 changes: 1 addition & 1 deletion eng/common/scripts/Helpers/Package-Helpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function CompatibleConvertFrom-Yaml {
$yqPresent = Get-Command 'yq' -ErrorAction SilentlyContinue
if (-not $yqPresent) {
. (Join-Path $PSScriptRoot PSModule-Helpers.ps1)
Install-ModuleIfNotInstalled -WhatIf:$false "powershell-yaml" "0.4.1" | Import-Module
Install-ModuleIfNotInstalled -WhatIf:$false "powershell-yaml" "0.4.7" | Import-Module
}

# Process the content (for example, you could convert from YAML here)
Expand Down
2 changes: 1 addition & 1 deletion eng/common/scripts/TypeSpec-Project-Generate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $ErrorActionPreference = "Stop"
. $PSScriptRoot/Helpers/PSModule-Helpers.ps1
. $PSScriptRoot/Helpers/CommandInvocation-Helpers.ps1
. $PSScriptRoot/common.ps1
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module

function NpmInstallForProject([string]$workingDirectory) {
Push-Location $workingDirectory
Expand Down
4 changes: 2 additions & 2 deletions eng/common/scripts/TypeSpec-Project-Process.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ param (

. $PSScriptRoot/common.ps1
. $PSScriptRoot/Helpers/PSModule-Helpers.ps1
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module

function CreateUpdate-TspLocation([System.Object]$tspConfig, [string]$TypeSpecProjectDirectory, [string]$CommitHash, [string]$repo, [string]$repoRoot, [ref]$isNewSdkProject) {
$additionalDirs = @()
Expand Down Expand Up @@ -225,4 +225,4 @@ if ($SkipSyncAndGenerate -and !$isNewSdkProject) {
}
}

return $sdkProjectFolder
return $sdkProjectFolder
2 changes: 1 addition & 1 deletion eng/common/scripts/TypeSpec-Project-Sync.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ param (

$ErrorActionPreference = "Stop"
. $PSScriptRoot/Helpers/PSModule-Helpers.ps1
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module
$sparseCheckoutFile = ".git/info/sparse-checkout"

function AddSparseCheckoutPath([string]$subDirectory) {
Expand Down
2 changes: 1 addition & 1 deletion eng/common/scripts/Update-DocsMsToc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ param(
. $PSScriptRoot/common.ps1
. $PSScriptRoot/Helpers/PSModule-Helpers.ps1

Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module

Set-StrictMode -Version 3

Expand Down
4 changes: 2 additions & 2 deletions eng/common/scripts/Verify-Resource-Ref.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
. (Join-Path $PSScriptRoot common.ps1)
Install-Module -Name powershell-yaml -RequiredVersion 0.4.1 -Force -Scope CurrentUser
Install-Module -Name powershell-yaml -RequiredVersion 0.4.7 -Force -Scope CurrentUser
$ymlfiles = Get-ChildItem $RepoRoot -recurse | Where-Object {$_ -like '*.yml'}
$affectedRepos = [System.Collections.ArrayList]::new()

Expand Down Expand Up @@ -48,4 +48,4 @@ if ($affectedRepos.Count -gt 0)
exit 1
}

Write-Output "All repository resources in yaml files reference a valid tag"
Write-Output "All repository resources in yaml files reference a valid tag"
2 changes: 1 addition & 1 deletion eng/common/scripts/Verify-RestApiSpecLocation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if (-not $GitHubPat) {

Write-Host "The spec used to release SDK should be from the main branch of Azure/azure-rest-api-specs repository."
Write-Host "ServiceDir:$ServiceDirectory, PackageName:$PackageName, ArtifactLocation:$ArtifactLocation, PackageInfoDirectory:$PackageInfoDirectory."
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module

# This function is used to verify the 'require' and 'input-file' settings in autorest.md point to the main branch of Azure/azure-rest-api-specs repository
# input-file may be:
Expand Down
2 changes: 1 addition & 1 deletion eng/common/scripts/job-matrix/job-matrix-functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ function GetMatrixConfigFromFile([String] $config) {
}

function GetMatrixConfigFromYaml([String] $yamlConfig) {
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module
# ConvertTo then from json is to make sure the nested values are in PSCustomObject
[MatrixConfig]$config = ConvertFrom-Yaml $yamlConfig -Ordered | ConvertTo-Json -Depth 100 | ConvertFrom-Json
return GetMatrixConfig $config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ function CheckDependencies()
}
)

Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module

$shouldError = $false
foreach ($dep in $deps) {
Expand Down