Skip to content

Commit cca3060

Browse files
authored
Sync eng/common directory with azure-sdk-tools repository (Azure#18708)
1 parent f707bc7 commit cca3060

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
param(
2+
$Repository,
3+
$Tag,
4+
$AuthToken
5+
)
6+
7+
. (Join-Path $PSScriptRoot common.ps1)
8+
9+
$repositoryParts = $Repository.Split("/")
10+
11+
if ($repositoryParts.Length -ne 2)
12+
{
13+
LogError "Repository is not a valid format."
14+
}
15+
16+
$repositoryOwner = $repositoryParts[0]
17+
LogDebug "Repository owner is: $repositoryOwner"
18+
19+
$repositoryName = $repositoryParts[1]
20+
LogDebug "Reposiory name is: $repositoryName"
21+
22+
$ref = "tags/$Tag"
23+
LogDebug "Calculated ref is: $ref"
24+
25+
try
26+
{
27+
Remove-GitHubSourceReferences -RepoOwner $repositoryOwner -RepoName $repositoryName -Ref $ref -AuthToken $AuthToken
28+
}
29+
catch
30+
{
31+
LogError "Remove-GitHubSourceReferences failed with exception:`n$_"
32+
exit 1
33+
}

0 commit comments

Comments
 (0)