diff --git a/eng/common/pipelines/templates/steps/verify-links.yml b/eng/common/pipelines/templates/steps/verify-links.yml index eaa2dd1426..b23a266cca 100644 --- a/eng/common/pipelines/templates/steps/verify-links.yml +++ b/eng/common/pipelines/templates/steps/verify-links.yml @@ -4,7 +4,7 @@ parameters: WorkingDirectory: '$(System.DefaultWorkingDirectory)' ScriptDirectory: 'eng/common/scripts' Recursive: $false - CheckLinkGuidance: $false + CheckLinkGuidance: $true Urls: '(Get-ChildItem -Path ./ -Recurse -Include *.md)' BranchReplaceRegex: "^(${env:SYSTEM_PULLREQUEST_SOURCEREPOSITORYURI}.*/(?:blob|tree)/)master(/.*)$" BranchReplacementName: "${env:SYSTEM_PULLREQUEST_SOURCECOMMITID}" diff --git a/eng/common/scripts/New-ReleaseAsset.ps1 b/eng/common/scripts/New-ReleaseAsset.ps1 deleted file mode 100644 index 83efcc097e..0000000000 --- a/eng/common/scripts/New-ReleaseAsset.ps1 +++ /dev/null @@ -1,62 +0,0 @@ -<# -.SYNOPSIS -Uploads the release asset and returns the resulting object from the upload - -.PARAMETER ReleaseTag -Tag to look up release - -.PARAMETER AssetPath -Location of the asset file to upload - -.PARAMETER GitHubRepo -Name of the GitHub repo to search (of the form Azure/azure-sdk-for-cpp) - -#> - -param ( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $ReleaseTag, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $AssetPath, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $GitHubRepo, - - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string] $GitHubPat -) - -# Get information about release at $ReleaseTag -$releaseInfoUrl = "https://api.github.com/repos/$GitHubRepo/releases/tags/$ReleaseTag" -Write-Verbose "Requesting release info from $releaseInfoUrl" -$release = Invoke-RestMethod ` - -Uri $releaseInfoUrl ` - -Method GET - -$assetFilename = Split-Path $AssetPath -Leaf - -# Upload URL comes in the literal form (yes, those curly braces) of: -# https://uploads.github.com/repos/Azure/azure-sdk-for-cpp/releases/123/assets{?name,label} -# Converts to something like: -# https://uploads.github.com/repos/Azure/azure-sdk-for-cpp/releases/123/assets?name=foo.tar.gz -# Docs: https://docs.github.com/en/rest/reference/repos#get-a-release-by-tag-name -$uploadUrl = $release.upload_url.Split('{')[0] + "?name=$assetFilename" - -Write-Verbose "Uploading $assetFilename to $uploadUrl" - -$asset = Invoke-RestMethod ` - -Uri $uploadUrl ` - -Method POST ` - -InFile $AssetPath ` - -Credential $credentials ` - -Headers @{ Authorization = "token $GitHubPat" } ` - -ContentType "application/gzip" - -Write-Verbose "Upload complete. Browser download URL: $($asset.browser_download_url)" - -return $asset