Skip to content

Commit 785bddf

Browse files
Add current source-build prebuilts to support offline builds (#14261)
1 parent 0595aeb commit 785bddf

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

eng/Version.Details.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
</Dependency>
187187
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="7.0.0-alpha.1.22402.1">
188188
<Uri>https://github.com/dotnet/source-build-externals</Uri>
189-
<Sha>26a8684b136d79c3d35b4c5c512858f932c57705</Sha>
189+
<Sha>85d7e996e497861648ffbfd0e929b2b627ce7f46</Sha>
190190
<SourceBuild RepoName="source-build-externals" ManagedOnly="true" />
191191
</Dependency>
192192
<Dependency Name="Microsoft.SourceBuild.Intermediate.symreader" Version="1.4.0-beta2-21475-02">

eng/Versions.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@
191191
necessary, and this property is removed from the file.
192192
-->
193193
<PrivateSourceBuiltArtifactsPackageVersion>0.1.0-7.0.100-bootstrap.7</PrivateSourceBuiltArtifactsPackageVersion>
194+
<PrivateSourceBuiltPrebuiltsPackageVersion>0.1.0-7.0.100-2</PrivateSourceBuiltPrebuiltsPackageVersion>
194195
</PropertyGroup>
195196
<!-- Workload manifest package versions -->
196197
<PropertyGroup>

src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ public class DotNetWatchTests : SmokeTests
1313
{
1414
public DotNetWatchTests(ITestOutputHelper outputHelper) : base(outputHelper) { }
1515

16-
[Fact]
16+
// TODO: Re-enable https://github.com/dotnet/source-build/issues/2961
17+
// [Fact]
1718
public void WatchTests()
1819
{
1920
string projectDirectory = DotNetHelper.ExecuteNew(DotNetTemplate.Console.GetName(), nameof(DotNetWatchTests));

src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateNuGetConfigPackageSourcesMappings.cs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ public override bool Execute()
4747
}
4848

4949
// Union all package sources to get the distinct list. These will get added to the source-build sources.
50-
IEnumerable<string> packagePatterns = pkgSrcMappingElement.Descendants()
50+
string[] packagePatterns = pkgSrcMappingElement.Descendants()
5151
.Where(e => e.Name == "packageSource")
5252
.SelectMany(e => e.Descendants().Where(e => e.Name == "package"))
5353
.Select(e => e.Attribute("pattern").Value)
54-
.Distinct();
54+
.Distinct()
55+
.ToArray();
5556

5657
if (!BuildWithOnlineSources)
5758
{
@@ -60,6 +61,11 @@ public override bool Execute()
6061
}
6162

6263
XElement pkgSrcMappingClearElement = pkgSrcMappingElement.Descendants().FirstOrDefault(e => e.Name == "clear");
64+
if (pkgSrcMappingClearElement == null)
65+
{
66+
pkgSrcMappingClearElement = new XElement("clear");
67+
pkgSrcMappingElement.AddFirst(pkgSrcMappingClearElement);
68+
}
6369

6470
foreach (string packageSource in SourceBuildSources)
6571
{
@@ -69,15 +75,7 @@ public override bool Execute()
6975
pkgSrc.Add(new XElement("package", new XAttribute("pattern", packagePattern)));
7076
}
7177

72-
if (pkgSrcMappingClearElement != null)
73-
{
74-
pkgSrcMappingClearElement.AddAfterSelf(pkgSrc);
75-
}
76-
else
77-
{
78-
pkgSrcMappingElement.AddFirst(pkgSrc);
79-
pkgSrcMappingElement.AddFirst(new XElement("clear"));
80-
}
78+
pkgSrcMappingClearElement.AddAfterSelf(pkgSrc);
8179
}
8280

8381
using (var writer = XmlWriter.Create(NuGetConfigFile, new XmlWriterSettings { NewLineChars = newLineChars, Indent = true }))

0 commit comments

Comments
 (0)