@@ -14,40 +14,40 @@ variables:
14
14
value : none
15
15
16
16
jobs :
17
- - job : CheckVersionBumpOnReleaseBranches
18
- displayName : " Check Version Bump On Release Branches"
19
- steps :
20
- - powershell : |
21
- $versionsFile = "eng/Versions.props"
22
- $changedFiles = git diff --name-only HEAD HEAD~1
23
- $changedVersionsFile = $changedFiles | Where-Object { $_ -eq $versionsFile }
24
- $isInitialCommit = $false
25
- $isVersionBumped = $false
26
- if ($changedVersionsFile -ne $null) {
27
- $difference = git diff HEAD~1 $versionsFile
28
- $changedContent = $difference -join "%"
29
- # 'DotNetFinalVersionKind' is expected to be added only during the initial setup of the release branch
30
- $initialCommitPattern = '-\s*<VersionPrefix>\d+\.\d+\.\d+<\/VersionPrefix>%.*\+\s*<VersionPrefix>\d+\.\d+\.\d+<\/VersionPrefix><DotNetFinalVersionKind>release<\/DotNetFinalVersionKind>'
31
- $isInitialCommit = $changedContent -match $initialCommitPattern
32
- $pattern = '-\s*<VersionPrefix>\d+\.\d+\.(?<previous>\d+)<\/VersionPrefix>.*%\+\s*<VersionPrefix>\d+\.\d+\.(?<current>\d+)<\/VersionPrefix>'
33
- if (!($isInitialCommit) -and ($changedContent -match $pattern)) {
34
- try {
35
- $previousPatch = [Convert]::ToInt32($Matches.previous)
36
- $currentPatch = [Convert]::ToInt32($Matches.current)
37
- if ($currentPatch -gt $previousPatch) {
38
- $isVersionBumped = $true
39
- }
40
- } catch {
41
- Write-Host "An error occurred during conversion: $_"
42
- }
43
- }
44
- }
17
+ # - job: CheckVersionBumpOnReleaseBranches
18
+ # displayName: "Check Version Bump On Release Branches"
19
+ # steps:
20
+ # - powershell: |
21
+ # $versionsFile = "eng/Versions.props"
22
+ # $changedFiles = git diff --name-only HEAD HEAD~1
23
+ # $changedVersionsFile = $changedFiles | Where-Object { $_ -eq $versionsFile }
24
+ # $isInitialCommit = $false
25
+ # $isVersionBumped = $false
26
+ # if ($changedVersionsFile -ne $null) {
27
+ # $difference = git diff HEAD~1 $versionsFile
28
+ # $changedContent = $difference -join "%"
29
+ # # 'DotNetFinalVersionKind' is expected to be added only during the initial setup of the release branch
30
+ # $initialCommitPattern = '-\s*<VersionPrefix>\d+\.\d+\.\d+<\/VersionPrefix>%.*\+\s*<VersionPrefix>\d+\.\d+\.\d+<\/VersionPrefix><DotNetFinalVersionKind>release<\/DotNetFinalVersionKind>'
31
+ # $isInitialCommit = $changedContent -match $initialCommitPattern
32
+ # $pattern = '-\s*<VersionPrefix>\d+\.\d+\.(?<previous>\d+)<\/VersionPrefix>.*%\+\s*<VersionPrefix>\d+\.\d+\.(?<current>\d+)<\/VersionPrefix>'
33
+ # if (!($isInitialCommit) -and ($changedContent -match $pattern)) {
34
+ # try {
35
+ # $previousPatch = [Convert]::ToInt32($Matches.previous)
36
+ # $currentPatch = [Convert]::ToInt32($Matches.current)
37
+ # if ($currentPatch -gt $previousPatch) {
38
+ # $isVersionBumped = $true
39
+ # }
40
+ # } catch {
41
+ # Write-Host "An error occurred during conversion: $_"
42
+ # }
43
+ # }
44
+ # }
45
45
46
- if (!($isInitialCommit -or $isVersionBumped)) {
47
- throw "Hello! I noticed that you're targeting one of our servicing branches. You need to increase the revision version number (the last part) of 'VersionPrefix' in eng/Versions.props."
48
- }
49
- condition: startsWith(variables['System.PullRequest.TargetBranch'], 'vs')
50
- displayName: "Check if patch version is bumped up"
46
+ # if (!($isInitialCommit -or $isVersionBumped)) {
47
+ # throw "Hello! I noticed that you're targeting one of our servicing branches. You need to increase the revision version number (the last part) of 'VersionPrefix' in eng/Versions.props."
48
+ # }
49
+ # condition: startsWith(variables['System.PullRequest.TargetBranch'], 'vs')
50
+ # displayName: "Check if patch version is bumped up"
51
51
52
52
- job : IfOnlyDocumentionChanged
53
53
displayName : " Check whether Test Results need to be executed"
0 commit comments