Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools repository (Azure#18092)
Browse files Browse the repository at this point in the history
  • Loading branch information
azure-sdk authored and Minnie Liu committed Jan 23, 2021
1 parent d1bd67e commit de6a82f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
6 changes: 6 additions & 0 deletions eng/common/docgeneration/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,9 @@
}
}
}






33 changes: 33 additions & 0 deletions eng/common/scripts/Delete-RemoteTag.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
param(
$Repository,
$Tag,
$AuthToken
)

. (Join-Path $PSScriptRoot common.ps1)

$repositoryParts = $Repository.Split("/")

if ($repositoryParts.Length -ne 2)
{
LogError "Repository is not a valid format."
}

$repositoryOwner = $repositoryParts[0]
LogDebug "Repository owner is: $repositoryOwner"

$repositoryName = $repositoryParts[1]
LogDebug "Reposiory name is: $repositoryName"

$ref = "tags/$Tag"
LogDebug "Calculated ref is: $ref"

try
{
Remove-GitHubSourceReferences -RepoOwner $repositoryOwner -RepoName $repositoryName -Ref $ref -AuthToken $AuthToken
}
catch
{
LogError "Remove-GitHubSourceReferences failed with exception:`n$_"
exit 1
}

0 comments on commit de6a82f

Please sign in to comment.