Sync eng/common directory with azure-sdk-tools repository (#87)

This commit is contained in:
Azure SDK Bot 2020-05-06 07:51:25 -07:00 committed by GitHub
parent bbc8b0b8bb
commit cad54bd983
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 8 deletions

View File

@ -124,7 +124,12 @@ if (![string]::IsNullOrWhiteSpace($ServiceDirectory)) {
$preRemovalScript = Join-Path -Path $root -ChildPath 'remove-test-resources-pre.ps1'
if (Test-Path $preRemovalScript) {
Log "Invoking pre resource removal script '$preRemovalScript'"
&$preRemovalScript -ResourceGroupName $ResourceGroupName @PSBoundParameters
if ($PSCmdlet.ParameterSetName.StartsWith('ResourceGroup')) {
$PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName);
}
&$preRemovalScript @PSBoundParameters
}
}

View File

@ -41,7 +41,7 @@ param(
$PRBody = $PRTitle
)
Write-Host $MyInvocation.Line
Write-Host "> $PSCommandPath $args"
$query = "state=open&head=${PROwner}:${PRBranch}&base=${BaseBranch}"

View File

@ -10,7 +10,7 @@ param (
$UploadLatest=1
)
Write-Host $MyInvocation.Line
Write-Host "> $PSCommandPath $args"
$Language = $Language.ToLower()

View File

@ -9,7 +9,9 @@ param (
[String]$TargetServices
)
$PACKAGE_README_REGEX = ".*[\/\\]sdk[\\\/][^\/\\]+[\\\/][^\/\\]+[\/\\]README\.md"
Write-Host "> $PSCommandPath $args"
$PACKAGE_README_REGEX = ".*[\/\\]sdk[\\\/][^\/\\]+[\\\/][^\/\\]+[\/\\]README\.md"
Write-Host "repo is $CodeRepo"
@ -52,10 +54,10 @@ else {
foreach($service in $selectedServices){
$readmePath = Join-Path -Path $CodeRepo -ChildPath "sdk/$service"
Write-Host "Examining: $readmePath"
Write-Host "Examining: $readmePath"
$libraries = $metadataResponse | Where-Object { $_.RepoPath -eq $service }
foreach($library in $libraries){
$package = $library.Package

View File

@ -18,7 +18,7 @@ param (
[switch]$forceCreate = $false
)
Write-Host $MyInvocation.Line
Write-Host "> $PSCommandPath $args"
$VERSION_REGEX = "(?<major>\d+)(\.(?<minor>\d+))?(\.(?<patch>\d+))?((?<pre>[^0-9][^\s]+))?"
$SDIST_PACKAGE_REGEX = "^(?<package>.*)\-(?<versionstring>$VERSION_REGEX$)"

View File

@ -28,7 +28,7 @@ param(
[string] $PushArgs = ""
)
Write-Host $MyInvocation.Line
Write-Host "> $PSCommandPath $args"
# This is necessay because of the janky git command output writing to stderr.
# Without explicitly setting the ErrorActionPreference to continue the script