Skip to content

Commit d1437b7

Browse files
committed
Began adding scripting logic for generating the overrides props file.
1 parent b341256 commit d1437b7

File tree

3 files changed

+84
-8
lines changed

3 files changed

+84
-8
lines changed

eng/create-version-override.ps1

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Using the downloaded workloads, this creates the VS drops to upload for VS insertion.
2+
# It builds the Microsoft.NET.Workloads.Vsman.vsmanproj per workload ZIP, which creates the appropriate VSMAN file.
3+
4+
# $workloadPath: The path to the directory containing the workload ZIPs, usually the output path used by DARC in the download-workloads.ps1 script.
5+
# - Example Value: "$(RepoRoot)artifacts\workloads"
6+
# $msBuildToolsPath: The path to the MSBuild tools directory, generally $(MSBuildToolsPath) in MSBuild.
7+
# - Example Value: 'C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin'
8+
9+
param ([bool] $createTestWorkloadSet = $false, [string] $sdkVersionMinor = '|default|', [string] $versionFeature = '|default|', [string] $versionPatch = '|default|', [string] $preReleaseVersionLabel = '|default|', [string] $preReleaseVersionIteration = '|default|')
10+
11+
$containsNonDefault = ($sdkVersionMinor, $versionFeature, $versionPatch, $preReleaseVersionLabel, $preReleaseVersionIteration | Where-Object { $_ -ne '|default|' }) -ne $null
12+
13+
if (-not $containsNonDefault -and -not $createTestWorkloadSet) {
14+
Write-Host "No version overrides to apply."
15+
exit 0
16+
}
17+
18+
$xmlDoc = New-Object System.Xml.XmlDocument
19+
$projectElement = $xmlDoc.CreateElement("Project")
20+
$xmlDoc.AppendChild($rootElement)
21+
22+
$propertyGroup1Element = $xmlDoc.CreateElement("PropertyGroup")
23+
$projectElement.AppendChild($propertyGroup1Element)
24+
25+
$propertyGroup2Element = $xmlDoc.CreateElement("PropertyGroup")
26+
$projectElement.AppendChild($propertyGroup2Element)
27+
28+
29+
$settingElement.SetAttribute("Name", "LogLevel")
30+
$settingElement.InnerText = "Debug"
31+
32+
$xmlDoc.Save("D:\Workspace\TestMe.xml")
33+
34+
35+
36+
# <Project>
37+
# <PropertyGroup>
38+
# <VersionSDKMinor>3</VersionSDKMinor>
39+
# <VersionFeature>05</VersionFeature>
40+
# <VersionPatch>0</VersionPatch>
41+
# <PreReleaseVersionLabel>rc</PreReleaseVersionLabel>
42+
# <PreReleaseVersionIteration Condition="'$(StabilizePackageVersion)' != 'true'">1</PreReleaseVersionIteration>
43+
# </PropertyGroup>
44+
# <PropertyGroup>
45+
# <VersionPrefix>$(VersionMajor).$(VersionSDKMinor)$(VersionFeature).$(VersionPatch)</VersionPrefix>
46+
# <WorkloadsVersion>$(VersionMajor).$(VersionMinor).$(VersionSDKMinor)$(VersionFeature)</WorkloadsVersion>
47+
# <WorkloadsVersion Condition="'$(StabilizePackageVersion)' == 'true' and '$(VersionPatch)' != '0'">$(WorkloadsVersion).$(VersionPatch)</WorkloadsVersion>
48+
# <SdkFeatureBand>$(VersionMajor).$(VersionMinor).$(VersionSDKMinor)00</SdkFeatureBand>
49+
# <SdkFeatureBand Condition="'$(StabilizePackageVersion)' != 'true' and $(PreReleaseVersionLabel) != 'servicing'">$(SdkFeatureBand)-$(PreReleaseVersionLabel).$(PreReleaseVersionIteration)</SdkFeatureBand>
50+
# <!-- Conditional include -->
51+
# <PreReleaseVersionIteration Condition="'$(TestWorkloadVersion)' == 'true' and $(PreReleaseVersionLabel) != 'servicing'">$(PreReleaseVersionIteration).0</PreReleaseVersionIteration>
52+
# <PreReleaseVersionIteration Condition="'$(TestWorkloadVersion)' == 'true' and $(PreReleaseVersionLabel) == 'servicing'">0</PreReleaseVersionIteration>
53+
# </PropertyGroup>
54+
# </Project>

eng/pipelines/official.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,16 @@ parameters:
8585
displayName: '[ ######## SET VERSION ######## ]'
8686
type: boolean
8787
default: false
88-
- name: setVersionMajor
89-
displayName: Set version major
90-
type: string
91-
default: '|default|'
92-
- name: setVersionMinor
93-
displayName: Set version minor (one digit)
88+
# - name: setVersionMajor
89+
# displayName: Set version major
90+
# type: string
91+
# default: '|default|'
92+
# - name: setVersionMinor
93+
# displayName: Set version minor
94+
# type: string
95+
# default: '|default|'
96+
- name: setSdkVersionMinor
97+
displayName: Set SDK version minor (one digit)
9498
type: string
9599
default: '|default|'
96100
- name: setVersionFeature
@@ -101,6 +105,25 @@ parameters:
101105
displayName: Set version patch
102106
type: string
103107
default: '|default|'
108+
- name: setPreReleaseVersionLabel
109+
displayName: Set pre-release version label
110+
type: string
111+
default: '|default|'
112+
values:
113+
- '|default|'
114+
- servicing
115+
- preview
116+
- rc
117+
- alpha
118+
- rtm
119+
- name: setPreReleaseVersionIteration
120+
displayName: Set pre-release version iteration
121+
type: string
122+
default: '|default|'
123+
- name: createTestWorkloadSet
124+
displayName: Create a test workload set
125+
type: boolean
126+
default: false
104127

105128
variables:
106129
# Variables used: DncEngInternalBuildPool

eng/pipelines/templates/jobs/workload-build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
-workloadListJson '$(WorkloadListJson)'
5454
-usePreComponents:$${{ parameters.usePreComponentsForVSInsertion }}
5555
-includeNonShipping:$${{ parameters.includeNonShippingWorkloads }}
56-
56+
- powershell: 'Insert script here'
5757
# https://github.com/dotnet/arcade/blob/ccae251ef033746eb0213329953f5e3c1687693b/Documentation/CorePackages/Publishing.md#basic-onboarding-scenario-for-new-repositories-to-the-current-publishing-version-v3
5858
- powershell: >-
5959
eng/common/build.ps1
@@ -69,7 +69,6 @@ jobs:
6969
displayName: 🟣 Build solution
7070
# Name is required to reference the variables created within this build step in other stages.
7171
name: BuildSolution
72-
7372
- ${{ if eq(parameters.createVSInsertion, true) }}:
7473
- task: 1ES.PublishPipelineArtifact@1
7574
displayName: 🟣 Publish workload artifacts

0 commit comments

Comments
 (0)