@@ -11,29 +11,9 @@ function AcquireLease($blob) {
11
11
}
12
12
}
13
13
14
- # set the build suffix
15
- $sourceBranch = $env: BUILD_SOURCEBRANCH
16
- $sourceBranchName = $env: BUILD_SOURCEBRANCHNAME
17
14
$buildReason = $env: BUILD_REASON
18
- $buildNumber = " $env: COUNTER "
19
- Write-Host " Source branch: '$sourceBranch '"
20
- Write-Host " Source branch name: '$sourceBranchName '"
21
- Write-Host " Build reason: '$buildReason '"
22
- Write-Host " Build number: '$buildNumber '"
23
-
24
- $buildNamePrefix = " "
25
- $isReleaseBuild = $false
26
15
27
16
if ($buildReason -eq " PullRequest" ) {
28
- $sourceBranch = $env: SYSTEM_PULLREQUEST_SOURCEBRANCH
29
- $targetBranch = $env: SYSTEM_PULLREQUEST_TARGETBRANCH
30
- $prNumber = $env: SYSTEM_PULLREQUEST_PULLREQUESTNUMBER
31
- $buildNamePrefix = " (PR $prNumber ) "
32
- Write-Host " PR source branch: '$sourceBranch '"
33
- Write-Host " PR target branch: '$targetBranch '"
34
- Write-Host " PR number: '$prNumber '"
35
- Write-Host " Build name prefix: '$buildNamePrefix '"
36
-
37
17
# parse PR title to see if we should pack this
38
18
$response = Invoke-RestMethod api.github.com / repos/ $env: BUILD_REPOSITORY_ID / pulls/ $env: SYSTEM_PULLREQUEST_PULLREQUESTNUMBER
39
19
$title = $response.title.ToLowerInvariant ()
@@ -42,33 +22,8 @@ if ($buildReason -eq "PullRequest") {
42
22
Write-Host " ##vso[task.setvariable variable=BuildArtifacts;isOutput=true]true"
43
23
Write-Host " Setting 'BuildArtifacts' to true."
44
24
}
45
- } else {
46
- if ($sourceBranch.endswith (" release/3.0" )) {
47
- Write-Host " This is a release build."
48
- $isReleaseBuild = $true
49
- }
50
- }
51
-
52
- $suffix = " ci"
53
- $emgSuffix = " ci$buildNumber " # ExtensionsMetadataGenerator suffix
54
-
55
- if ($isReleaseBuild ) {
56
- $suffix = " "
57
- $emgSuffix = " "
58
- $buildNamePrefix = " (Release) "
59
25
}
60
26
61
- $buildName = " $buildNamePrefix " + " 3.0." + " $buildNumber "
62
-
63
- Write-Host " ##vso[task.setvariable variable=Suffix;isOutput=true]$suffix "
64
- Write-Host " ##vso[task.setvariable variable=EmgSuffix;isOutput=true]$emgSuffix "
65
- Write-Host " ##vso[task.setvariable variable=BuildNumber;isOutput=true]$buildNumber "
66
- Write-Host " ##vso[build.updatebuildnumber]$buildName "
67
- Write-Host " Setting 'Suffix' to '$suffix '."
68
- Write-Host " Setting 'EmgSuffix' to '$emgSuffix '."
69
- Write-Host " Setting 'BuildNumber' to '$buildNumber '."
70
- Write-Host " Setting build name to '$buildName '."
71
-
72
27
# get a blob lease to prevent test overlap
73
28
$storageContext = New-AzureStorageContext - ConnectionString $connectionString
74
29
While ($true ) {
0 commit comments