Upgrade from 2.1.300-rc1 to 2.1.300-rtm (#9)
- Add DotNetCore PackageSource - Replace PackageSource.NuGetOrg with PackageSource.DotNetCore (as needed) - Remove version number from a few files included in self-contained deployments - Add "*.csproj.Complete" (Reaction to https://github.com/aspnet/Razor/pull/2316)
This commit is contained in:
parent
af886b156b
commit
a06a7b55c4
|
|
@ -20,4 +20,4 @@ public class AssemblySetUp
|
||||||
{
|
{
|
||||||
IOUtil.DeleteDir(TempDir);
|
IOUtil.DeleteDir(TempDir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,12 @@ namespace AspNetCoreSdkTests
|
||||||
SourceArgumentLazy = new Lazy<string>("--source https://api.nuget.org/v3/index.json"),
|
SourceArgumentLazy = new Lazy<string>("--source https://api.nuget.org/v3/index.json"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static NuGetPackageSource DotNetCore { get; } = new NuGetPackageSource
|
||||||
|
{
|
||||||
|
Name = nameof(DotNetCore),
|
||||||
|
SourceArgumentLazy = new Lazy<string>("--source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json"),
|
||||||
|
};
|
||||||
|
|
||||||
public static NuGetPackageSource EnvironmentVariable { get; } = new NuGetPackageSource
|
public static NuGetPackageSource EnvironmentVariable { get; } = new NuGetPackageSource
|
||||||
{
|
{
|
||||||
Name = nameof(EnvironmentVariable),
|
Name = nameof(EnvironmentVariable),
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,6 @@ namespace AspNetCoreSdkTests
|
||||||
OSPlatforms = new[] { OSPlatform.Linux, OSPlatform.OSX, OSPlatform.Windows, },
|
OSPlatforms = new[] { OSPlatform.Linux, OSPlatform.OSX, OSPlatform.Windows, },
|
||||||
};
|
};
|
||||||
|
|
||||||
public static RuntimeIdentifier Win_x64 = new RuntimeIdentifier() {
|
|
||||||
Name = "win-x64",
|
|
||||||
OSPlatforms = new[] { OSPlatform.Windows, },
|
|
||||||
};
|
|
||||||
|
|
||||||
public static RuntimeIdentifier Linux_x64 = new RuntimeIdentifier() {
|
public static RuntimeIdentifier Linux_x64 = new RuntimeIdentifier() {
|
||||||
Name = "linux-x64",
|
Name = "linux-x64",
|
||||||
OSPlatforms = new[] { OSPlatform.Linux, },
|
OSPlatforms = new[] { OSPlatform.Linux, },
|
||||||
|
|
@ -28,6 +23,20 @@ namespace AspNetCoreSdkTests
|
||||||
OSPlatforms = new[] { OSPlatform.OSX, },
|
OSPlatforms = new[] { OSPlatform.OSX, },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static RuntimeIdentifier Win_x64 = new RuntimeIdentifier()
|
||||||
|
{
|
||||||
|
Name = "win-x64",
|
||||||
|
OSPlatforms = new[] { OSPlatform.Windows, },
|
||||||
|
};
|
||||||
|
|
||||||
|
public static IEnumerable<RuntimeIdentifier> All = new[]
|
||||||
|
{
|
||||||
|
RuntimeIdentifier.None,
|
||||||
|
RuntimeIdentifier.Linux_x64,
|
||||||
|
RuntimeIdentifier.OSX_x64,
|
||||||
|
RuntimeIdentifier.Win_x64,
|
||||||
|
};
|
||||||
|
|
||||||
private RuntimeIdentifier() { }
|
private RuntimeIdentifier() { }
|
||||||
|
|
||||||
public string Name { get; private set; }
|
public string Name { get; private set; }
|
||||||
|
|
|
||||||
|
|
@ -81,61 +81,50 @@ namespace AspNetCoreSdkTests
|
||||||
serverError);
|
serverError);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly IEnumerable<Template> _restoreTemplates = new[]
|
private static IEnumerable<Template> GetTemplates(RuntimeIdentifier runtimeIdentifier)
|
||||||
{
|
{
|
||||||
// Framework-dependent
|
if (runtimeIdentifier == RuntimeIdentifier.None)
|
||||||
Template.GetInstance<ClassLibraryTemplate>(NuGetPackageSource.None, RuntimeIdentifier.None),
|
{
|
||||||
Template.GetInstance<ConsoleApplicationTemplate>(NuGetPackageSource.None, RuntimeIdentifier.None),
|
// Framework-dependent
|
||||||
// Offline restore currently not supported for RazorClassLibrary template (https://github.com/aspnet/Universe/issues/1123)
|
return new[]
|
||||||
Template.GetInstance<RazorClassLibraryTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.None),
|
{
|
||||||
Template.GetInstance<WebTemplate>(NuGetPackageSource.None, RuntimeIdentifier.None),
|
Template.GetInstance<ClassLibraryTemplate>(NuGetPackageSource.None, runtimeIdentifier),
|
||||||
Template.GetInstance<RazorTemplate>(NuGetPackageSource.None, RuntimeIdentifier.None),
|
Template.GetInstance<ConsoleApplicationTemplate>(NuGetPackageSource.None, runtimeIdentifier),
|
||||||
Template.GetInstance<MvcTemplate>(NuGetPackageSource.None, RuntimeIdentifier.None),
|
// Offline restore currently not supported for RazorClassLibrary template (https://github.com/aspnet/Universe/issues/1123)
|
||||||
Template.GetInstance<AngularTemplate>(NuGetPackageSource.None, RuntimeIdentifier.None),
|
Template.GetInstance<RazorClassLibraryTemplate>(NuGetPackageSource.NuGetOrg, runtimeIdentifier),
|
||||||
Template.GetInstance<ReactTemplate>(NuGetPackageSource.None, RuntimeIdentifier.None),
|
Template.GetInstance<WebTemplate>(NuGetPackageSource.None, runtimeIdentifier),
|
||||||
Template.GetInstance<ReactReduxTemplate>(NuGetPackageSource.None, RuntimeIdentifier.None),
|
Template.GetInstance<RazorTemplate>(NuGetPackageSource.None, runtimeIdentifier),
|
||||||
Template.GetInstance<WebApiTemplate>(NuGetPackageSource.None, RuntimeIdentifier.None),
|
Template.GetInstance<MvcTemplate>(NuGetPackageSource.None, runtimeIdentifier),
|
||||||
|
Template.GetInstance<AngularTemplate>(NuGetPackageSource.None, runtimeIdentifier),
|
||||||
|
Template.GetInstance<ReactTemplate>(NuGetPackageSource.None, runtimeIdentifier),
|
||||||
|
Template.GetInstance<ReactReduxTemplate>(NuGetPackageSource.None, runtimeIdentifier),
|
||||||
|
Template.GetInstance<WebApiTemplate>(NuGetPackageSource.None, runtimeIdentifier),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Self-contained
|
||||||
|
return new[]
|
||||||
|
{
|
||||||
|
// ClassLibrary does not require a package source, even for self-contained deployments
|
||||||
|
Template.GetInstance<ClassLibraryTemplate>(NuGetPackageSource.None, runtimeIdentifier),
|
||||||
|
Template.GetInstance<ConsoleApplicationTemplate>(NuGetPackageSource.DotNetCore, runtimeIdentifier),
|
||||||
|
Template.GetInstance<RazorClassLibraryTemplate>(NuGetPackageSource.NuGetOrg, runtimeIdentifier),
|
||||||
|
Template.GetInstance<WebTemplate>(NuGetPackageSource.DotNetCore, runtimeIdentifier),
|
||||||
|
Template.GetInstance<RazorTemplate>(NuGetPackageSource.DotNetCore, runtimeIdentifier),
|
||||||
|
Template.GetInstance<MvcTemplate>(NuGetPackageSource.DotNetCore, runtimeIdentifier),
|
||||||
|
Template.GetInstance<AngularTemplate>(NuGetPackageSource.DotNetCore, runtimeIdentifier),
|
||||||
|
Template.GetInstance<ReactTemplate>(NuGetPackageSource.DotNetCore, runtimeIdentifier),
|
||||||
|
Template.GetInstance<ReactReduxTemplate>(NuGetPackageSource.DotNetCore, runtimeIdentifier),
|
||||||
|
Template.GetInstance<WebApiTemplate>(NuGetPackageSource.DotNetCore, runtimeIdentifier),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Self-contained, win-x64
|
private static readonly IEnumerable<Template> _restoreTemplates = RuntimeIdentifier.All.SelectMany(r => GetTemplates(r));
|
||||||
// ClassLibrary does not require a package source, even for self-contained deployments
|
|
||||||
Template.GetInstance<ClassLibraryTemplate>(NuGetPackageSource.None, RuntimeIdentifier.Win_x64),
|
|
||||||
Template.GetInstance<ConsoleApplicationTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Win_x64),
|
|
||||||
Template.GetInstance<RazorClassLibraryTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Win_x64),
|
|
||||||
Template.GetInstance<WebTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Win_x64),
|
|
||||||
Template.GetInstance<RazorTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Win_x64),
|
|
||||||
Template.GetInstance<MvcTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Win_x64),
|
|
||||||
Template.GetInstance<AngularTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Win_x64),
|
|
||||||
Template.GetInstance<ReactTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Win_x64),
|
|
||||||
Template.GetInstance<ReactReduxTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Win_x64),
|
|
||||||
Template.GetInstance<WebApiTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Win_x64),
|
|
||||||
|
|
||||||
// Self-contained, linux-x64
|
|
||||||
// ClassLibrary does not require a package source, even for self-contained deployments
|
|
||||||
Template.GetInstance<ClassLibraryTemplate>(NuGetPackageSource.None, RuntimeIdentifier.Linux_x64),
|
|
||||||
Template.GetInstance<ConsoleApplicationTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Linux_x64),
|
|
||||||
Template.GetInstance<RazorClassLibraryTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Linux_x64),
|
|
||||||
Template.GetInstance<WebTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Linux_x64),
|
|
||||||
Template.GetInstance<RazorTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Linux_x64),
|
|
||||||
Template.GetInstance<MvcTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Linux_x64),
|
|
||||||
Template.GetInstance<AngularTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Linux_x64),
|
|
||||||
Template.GetInstance<ReactTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Linux_x64),
|
|
||||||
Template.GetInstance<ReactReduxTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Linux_x64),
|
|
||||||
Template.GetInstance<WebApiTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.Linux_x64),
|
|
||||||
|
|
||||||
// Self-contained, osx-x64
|
|
||||||
// ClassLibrary does not require a package source, even for self-contained deployments
|
|
||||||
Template.GetInstance<ClassLibraryTemplate>(NuGetPackageSource.None, RuntimeIdentifier.OSX_x64),
|
|
||||||
Template.GetInstance<ConsoleApplicationTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.OSX_x64),
|
|
||||||
Template.GetInstance<RazorClassLibraryTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.OSX_x64),
|
|
||||||
Template.GetInstance<WebTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.OSX_x64),
|
|
||||||
Template.GetInstance<RazorTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.OSX_x64),
|
|
||||||
Template.GetInstance<MvcTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.OSX_x64),
|
|
||||||
Template.GetInstance<AngularTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.OSX_x64),
|
|
||||||
Template.GetInstance<ReactTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.OSX_x64),
|
|
||||||
Template.GetInstance<ReactReduxTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.OSX_x64),
|
|
||||||
Template.GetInstance<WebApiTemplate>(NuGetPackageSource.NuGetOrg, RuntimeIdentifier.OSX_x64),
|
|
||||||
};
|
|
||||||
|
|
||||||
|
// Must call ToList() or similar on RestoreData to ensure TestCaseData instances can be compared to each other,
|
||||||
|
// which is required to use Except() in RunData.
|
||||||
public static IEnumerable<TestCaseData> RestoreData = _restoreTemplates.Select(t => new TestCaseData(t)).ToList();
|
public static IEnumerable<TestCaseData> RestoreData = _restoreTemplates.Select(t => new TestCaseData(t)).ToList();
|
||||||
|
|
||||||
public static IEnumerable<TestCaseData> BuildData => RestoreData;
|
public static IEnumerable<TestCaseData> BuildData => RestoreData;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace AspNetCoreSdkTests.Templates
|
||||||
// the file contents being identical. Replacing the generated hash with "[HASH]" allows the tests to pass
|
// the file contents being identical. Replacing the generated hash with "[HASH]" allows the tests to pass
|
||||||
// on both platforms.
|
// on both platforms.
|
||||||
public override IEnumerable<string> FilesAfterPublish =>
|
public override IEnumerable<string> FilesAfterPublish =>
|
||||||
base.FilesAfterPublish.Select(f => Regex.Replace(f, @"main\.[0-9a-f]*\.bundle\.js$", "main.[HASH].bundle.js"));
|
base.FilesAfterPublish.Select(f => Regex.Replace(f, @"main\.[0-9a-f]+\.bundle\.js$", "main.[HASH].bundle.js"));
|
||||||
|
|
||||||
public override IEnumerable<string> ExpectedFilesAfterPublish =>
|
public override IEnumerable<string> ExpectedFilesAfterPublish =>
|
||||||
base.ExpectedFilesAfterPublish
|
base.ExpectedFilesAfterPublish
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,12 @@ namespace AspNetCoreSdkTests.Templates
|
||||||
base.ExpectedBinFilesAfterBuild
|
base.ExpectedBinFilesAfterBuild
|
||||||
.Concat(_additionalBinFilesAfterBuild[RuntimeIdentifier]());
|
.Concat(_additionalBinFilesAfterBuild[RuntimeIdentifier]());
|
||||||
|
|
||||||
|
// A few files included in self-contained deployments contain version numbers in the filename, which must
|
||||||
|
// be replaced so tests can pass on all versions.
|
||||||
|
public override IEnumerable<string> FilesAfterPublish =>
|
||||||
|
base.FilesAfterPublish
|
||||||
|
.Select(f => Regex.Replace(f, @"_amd64_amd64_[0-9\.]+\.dll$", "_amd64_amd64_[VERSION].dll"));
|
||||||
|
|
||||||
private Func<IEnumerable<string>> _additionalFilesAfterPublishCommon = () => new[]
|
private Func<IEnumerable<string>> _additionalFilesAfterPublishCommon = () => new[]
|
||||||
{
|
{
|
||||||
"Microsoft.CSharp.dll",
|
"Microsoft.CSharp.dll",
|
||||||
|
|
@ -298,13 +304,13 @@ namespace AspNetCoreSdkTests.Templates
|
||||||
"hostpolicy.dll",
|
"hostpolicy.dll",
|
||||||
"Microsoft.DiaSymReader.Native.amd64.dll",
|
"Microsoft.DiaSymReader.Native.amd64.dll",
|
||||||
"mscordaccore.dll",
|
"mscordaccore.dll",
|
||||||
"mscordaccore_amd64_amd64_4.6.26426.02.dll",
|
"mscordaccore_amd64_amd64_[VERSION].dll",
|
||||||
"mscordbi.dll",
|
"mscordbi.dll",
|
||||||
"mscorrc.debug.dll",
|
"mscorrc.debug.dll",
|
||||||
"mscorrc.dll",
|
"mscorrc.dll",
|
||||||
"sos.dll",
|
"sos.dll",
|
||||||
"SOS.NETCore.dll",
|
"SOS.NETCore.dll",
|
||||||
"sos_amd64_amd64_4.6.26426.02.dll",
|
"sos_amd64_amd64_[VERSION].dll",
|
||||||
"ucrtbase.dll",
|
"ucrtbase.dll",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ namespace AspNetCoreSdkTests.Templates
|
||||||
{
|
{
|
||||||
public static IEnumerable<string> GetExpectedObjFilesAfterBuild(Template template) => new[]
|
public static IEnumerable<string> GetExpectedObjFilesAfterBuild(Template template) => new[]
|
||||||
{
|
{
|
||||||
|
// Added between 2.1.300-rc1 and 2.1.300-rtm (https://github.com/aspnet/Razor/pull/2316)
|
||||||
|
$"{template.Name}.csproj.CopyComplete",
|
||||||
$"{template.Name}.RazorAssemblyInfo.cache",
|
$"{template.Name}.RazorAssemblyInfo.cache",
|
||||||
$"{template.Name}.RazorAssemblyInfo.cs",
|
$"{template.Name}.RazorAssemblyInfo.cs",
|
||||||
$"{template.Name}.RazorCoreGenerate.cache",
|
$"{template.Name}.RazorCoreGenerate.cache",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue