-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Move in-vertical manifest merging to new arcade package #47881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
45bec13
Move in-vertical manifest merging to new arcade package
mmitche d947bf3
Updates
mmitche a29c13f
Merge remote-tracking branch 'upstream/main' into move-in-vertical-me…
mmitche da08eb1
Update from VMR build
mmitche 02121e0
Merge branch 'main' into move-in-vertical-merging-to-manifest
mmitche 9f45e2f
Remove PublishingVersion property from build arguments
mmitche 14073f2
Revert "Remove PublishingVersion property from build arguments"
mmitche File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,7 +1,8 @@ | ||||||||||||||||||||||
<Project Sdk="Microsoft.NET.Sdk"> | ||||||||||||||||||||||
|
||||||||||||||||||||||
<PropertyGroup> | ||||||||||||||||||||||
<TargetFramework>$(NetCurrent)</TargetFramework> | ||||||||||||||||||||||
<TargetFramework>$(NetCurrent)</TargetFramework> | ||||||||||||||||||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> | ||||||||||||||||||||||
</PropertyGroup> | ||||||||||||||||||||||
|
||||||||||||||||||||||
<ItemGroup> | ||||||||||||||||||||||
|
@@ -13,4 +14,10 @@ | |||||||||||||||||||||
<PackageReference Include="Newtonsoft.Json" IncludeAssets="compile" /> | ||||||||||||||||||||||
</ItemGroup> | ||||||||||||||||||||||
|
||||||||||||||||||||||
<!-- These are actual dependencies --> | ||||||||||||||||||||||
<ItemGroup> | ||||||||||||||||||||||
<PackageReference Include="Microsoft.DotNet.Build.Manifest" /> | ||||||||||||||||||||||
<PackageReference Include="Microsoft.Arcade.Common" /> | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: indentation
Suggested change
|
||||||||||||||||||||||
</ItemGroup> | ||||||||||||||||||||||
Comment on lines
+17
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
</Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
69 changes: 69 additions & 0 deletions
69
...eBuild/content/test/Microsoft.DotNet.UnifiedBuild.Tasks.Tests/MergeAssetManifestsTests.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
using Microsoft.Build.Utilities; | ||
using Microsoft.DotNet.UnifiedBuild.Tasks; | ||
using Microsoft.DotNet.UnifiedBuild.Tasks.ManifestAssets; | ||
using NuGet.ContentModel; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Xml.Linq; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
using static System.Net.Mime.MediaTypeNames; | ||
|
||
namespace Microsoft.DotNet.Tests | ||
{ | ||
/// <summary> | ||
/// Tests for the MergeAssetManifests task. This task is used to join the repo builds in a single vertical | ||
/// </summary> | ||
[Trait("Category", "MergeAssetManifests")] | ||
public class MergeAssetManifestsTests | ||
{ | ||
private const string manifestsBasePath = "MergeAssetManifestsTests"; | ||
|
||
[Theory] | ||
[InlineData("manifests1")] | ||
[InlineData("manifests2")] | ||
[InlineData("manifests3")] | ||
public static void MergeManifestCheck(string manifestSet) | ||
{ | ||
// Load all manifests in the manifests2 directory | ||
var manifestPaths = Directory.EnumerateFiles(AssetsLoader.GetAssetFullPath(Path.Combine(manifestsBasePath, manifestSet)), "*.xml") | ||
.Where(p => Path.GetFileName(p) != "expected.xml") | ||
.Select(p => Path.Combine(manifestsBasePath, manifestSet, p)) | ||
.ToList(); | ||
string expectedPath = AssetsLoader.GetAssetFullPath(Path.Combine(manifestsBasePath, manifestSet, "expected.xml")); | ||
|
||
// Create a temporary file to write the merged manifest | ||
|
||
string tempFile = Path.Combine(Path.GetTempFileName()); | ||
|
||
try | ||
{ | ||
var task = new MergeAssetManifests | ||
{ | ||
AssetManifest = manifestPaths.Select(p => new TaskItem(AssetsLoader.GetAssetFullPath(p))).ToArray(), | ||
VerticalName = "Windows_x64", | ||
MergedAssetManifestOutputPath = tempFile, | ||
BuildEngine = new MockBuildEngine() | ||
}; | ||
|
||
task.Execute(); | ||
|
||
Assert.False(task.Log.HasLoggedErrors); | ||
|
||
// Load the merged manifest xml and compare to the expected output. | ||
var mergedManifest = XDocument.Load(tempFile); | ||
var expectedManifest = XDocument.Load(AssetsLoader.GetAssetFullPath(expectedPath)); | ||
Assert.Equal(expectedManifest.ToString(), mergedManifest.ToString()); | ||
} | ||
finally | ||
{ | ||
// Clean up the temporary file | ||
if (File.Exists(tempFile)) | ||
{ | ||
File.Delete(tempFile); | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.