Skip to content

Commit 752bdba

Browse files
authored
Update VS insertions for 17.14 (dotnet#11558)
1 parent e837c39 commit 752bdba

File tree

3 files changed

+51
-41
lines changed

3 files changed

+51
-41
lines changed

.vsts-dotnet-ci.yml

+33-33
Original file line numberDiff line numberDiff line change
@@ -14,40 +14,40 @@ variables:
1414
value: none
1515

1616
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+
# }
4545

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"
5151

5252
- job: IfOnlyDocumentionChanged
5353
displayName: "Check whether Test Results need to be executed"

azure-pipelines/vs-insertion-experimental.yml

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
trigger: none
33
name: $(Date:yyyyMMdd).$(Rev:r)
44

5+
# Since our release branch is the one flowing into main
6+
# we will keep our main experimental insertions to make sure everything is alright
7+
schedules:
8+
- cron: '0 3 * * 1,3,5' # Runs every Monday, Wednesday and Friday at 3AM UTC
9+
displayName: Experimental VS insertion main
10+
branches:
11+
include:
12+
- main
13+
always: false # Don't run if there are no code changes
14+
515
resources:
616
pipelines:
717
- pipeline: 'MSBuild'

azure-pipelines/vs-insertion.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ trigger: none
1212
pr: none
1313
name: $(Date:yyyyMMdd).$(Rev:r)
1414

15-
schedules:
16-
- cron: '0 3 * * 1-5' # Runs every weekday at 3AM UTC
17-
displayName: Daily VS insertion main
18-
branches:
19-
include:
20-
- main
21-
always: false # Don't run if there are no code changes
15+
# schedules:
16+
# - cron: '0 3 * * 1-5' # Runs every weekday at 3AM UTC
17+
# displayName: Daily VS insertion main
18+
# branches:
19+
# include:
20+
# - main
21+
# always: false # Don't run if there are no code changes
2222

2323
resources:
2424
pipelines:
@@ -66,7 +66,7 @@ variables:
6666
# `auto` should work every time and selecting a branch in parameters is likely to fail due to incompatible versions in MSBuild and VS
6767
- name: AutoInsertTargetBranch
6868
${{ if eq(variables['Build.SourceBranchName'], 'vs17.14') }}:
69-
value: 'rel/d17.14'
69+
value: 'main'
7070
${{ elseif eq(variables['Build.SourceBranchName'], 'vs17.13') }}:
7171
value: 'rel/d17.13'
7272
${{ elseif eq(variables['Build.SourceBranchName'], 'vs17.12') }}:

0 commit comments

Comments
 (0)