[vs-workload.props] Append xcode info to VSMAN (#21657)

Context:
06fea905cf

In order to add .NET 9 Xcode16.1 builds to VS we'll need to insert packs
from two different commits on the `release/9.0.1xx-preview` branch.

Xcode information will now be added to the VS manifest that we generate
to allow us to produce unique manifests across the same branch.
This commit is contained in:
Peter Collins 2024-11-19 19:14:01 -05:00 коммит произвёл GitHub
Родитель 34666f5228
Коммит 4681428636
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -221,6 +221,7 @@ $(DOTNET_NUPKG_DIR)/vs-workload.props: Makefile $(GENERATE_VS_WORKLOAD)
--shorten Microsoft.NET.Sdk.MacCatalyst.Manifest=Microsoft.MacCatalyst.Manifest \ --shorten Microsoft.NET.Sdk.MacCatalyst.Manifest=Microsoft.MacCatalyst.Manifest \
--shorten Microsoft.tvOS.Runtime.tvossimulator=Microsoft.tvOS.Runtime \ --shorten Microsoft.tvOS.Runtime.tvossimulator=Microsoft.tvOS.Runtime \
--tfm $(DOTNET_TFM) \ --tfm $(DOTNET_TFM) \
--xcode $(XCODE_VERSION) \
--output $@.tmp --output $@.tmp
$(Q) mv $@.tmp $@ $(Q) mv $@.tmp $@

Просмотреть файл

@ -12,6 +12,7 @@ var shorten = new Dictionary<string, string> ();
var platforms = new List<(string, string)> (); var platforms = new List<(string, string)> ();
var windowsPlatforms = new List<string> (); var windowsPlatforms = new List<string> ();
var tfm = string.Empty; var tfm = string.Empty;
var xcodeName = string.Empty;
var outputPath = string.Empty; var outputPath = string.Empty;
var queue = new Queue<string> (args); var queue = new Queue<string> (args);
@ -37,6 +38,9 @@ while (queue.Any ()) {
case "--tfm": case "--tfm":
tfm = queue.Dequeue (); tfm = queue.Dequeue ();
break; break;
case "--xcode":
xcodeName = $"xcode{queue.Dequeue ()}";
break;
default: default:
Console.Error.WriteLine ($"Unknown argument: {arg}"); Console.Error.WriteLine ($"Unknown argument: {arg}");
return 1; return 1;
@ -48,7 +52,7 @@ using (TextWriter writer = new StreamWriter (outputPath)) {
writer.WriteLine ($"<Project>"); writer.WriteLine ($"<Project>");
writer.WriteLine ($" <PropertyGroup>"); writer.WriteLine ($" <PropertyGroup>");
var allPlatforms = string.Join (".", platforms.Select (v => v.Item1).OrderBy (v => v)); var allPlatforms = string.Join (".", platforms.Select (v => v.Item1).OrderBy (v => v));
writer.WriteLine ($" <TargetName>Microsoft.NET.Sdk.{allPlatforms}.Workload.{tfm}</TargetName>"); writer.WriteLine ($" <TargetName>Microsoft.NET.Sdk.{allPlatforms}.Workload.{tfm}.{xcodeName}</TargetName>");
// Find the iOS version, otherwise use the version of the first platform listed. // Find the iOS version, otherwise use the version of the first platform listed.
var iOSPlatform = platforms.Where (v => v.Item1 == "iOS"); var iOSPlatform = platforms.Where (v => v.Item1 == "iOS");
var manifestBuildVersion = iOSPlatform.Any () ? iOSPlatform.First ().Item2 : platforms.First ().Item2; var manifestBuildVersion = iOSPlatform.Any () ? iOSPlatform.First ().Item2 : platforms.First ().Item2;