Sync build_projects/shared-build-targets-utils with Core-Setup
This commit is contained in:
parent
c1bbdbf1ea
commit
f31472764f
11 changed files with 60 additions and 30 deletions
16
build_projects/dotnet-cli-build/CliDependencyVersions.cs
Normal file
16
build_projects/dotnet-cli-build/CliDependencyVersions.cs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Microsoft.DotNet.Cli.Build
|
||||||
|
{
|
||||||
|
public class CliDependencyVersions
|
||||||
|
{
|
||||||
|
public static readonly string SharedFrameworkVersion = "1.0.0-rc3-004324";
|
||||||
|
public static readonly string SharedHostVersion = "1.0.1-rc3-004324-00";
|
||||||
|
|
||||||
|
public static readonly string SharedFrameworkChannel = "preview";
|
||||||
|
public static readonly string SharedHostChannel = "preview";
|
||||||
|
}
|
||||||
|
}
|
15
build_projects/dotnet-cli-build/CliDirs.cs
Normal file
15
build_projects/dotnet-cli-build/CliDirs.cs
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using Microsoft.DotNet.InternalAbstractions;
|
||||||
|
|
||||||
|
namespace Microsoft.DotNet.Cli.Build
|
||||||
|
{
|
||||||
|
public static class CliDirs
|
||||||
|
{
|
||||||
|
public static readonly string CoreSetupDownload = Path.Combine(
|
||||||
|
Dirs.Intermediate,
|
||||||
|
"coreSetupDownload",
|
||||||
|
CliDependencyVersions.SharedFrameworkVersion);
|
||||||
|
}
|
||||||
|
}
|
|
@ -229,7 +229,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
deleteDepsJson: true);
|
deleteDepsJson: true);
|
||||||
|
|
||||||
// Crossgen SDK directory
|
// Crossgen SDK directory
|
||||||
var sharedFrameworkNugetVersion = DependencyVersions.SharedFrameworkVersion;
|
var sharedFrameworkNugetVersion = CliDependencyVersions.SharedFrameworkVersion;
|
||||||
var sharedFrameworkNameVersionPath = SharedFrameworkPublisher.GetSharedFrameworkPublishPath(
|
var sharedFrameworkNameVersionPath = SharedFrameworkPublisher.GetSharedFrameworkPublishPath(
|
||||||
rootOutputDirectory,
|
rootOutputDirectory,
|
||||||
sharedFrameworkNugetVersion);
|
sharedFrameworkNugetVersion);
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
var manPagesDir = Path.Combine(Dirs.RepoRoot, "Documentation", "manpages");
|
var manPagesDir = Path.Combine(Dirs.RepoRoot, "Documentation", "manpages");
|
||||||
var previousVersionURL = $"https://dotnetcli.blob.core.windows.net/dotnet/{channel}/Installers/Latest/dotnet-ubuntu-x64.latest.deb";
|
var previousVersionURL = $"https://dotnetcli.blob.core.windows.net/dotnet/{channel}/Installers/Latest/dotnet-ubuntu-x64.latest.deb";
|
||||||
var sdkPublishRoot = c.BuildContext.Get<string>("CLISDKRoot");
|
var sdkPublishRoot = c.BuildContext.Get<string>("CLISDKRoot");
|
||||||
var sharedFxDebianPackageName = Monikers.GetDebianSharedFrameworkPackageName(c);
|
var sharedFxDebianPackageName = Monikers.GetDebianSharedFrameworkPackageName(CliDependencyVersions.SharedFrameworkVersion);
|
||||||
|
|
||||||
var objRoot = Path.Combine(Dirs.Output, "obj", "debian", "sdk");
|
var objRoot = Path.Combine(Dirs.Output, "obj", "debian", "sdk");
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
"-m", manPagesDir,
|
"-m", manPagesDir,
|
||||||
"--framework-debian-package-name", sharedFxDebianPackageName,
|
"--framework-debian-package-name", sharedFxDebianPackageName,
|
||||||
"--framework-nuget-name", Monikers.SharedFrameworkName,
|
"--framework-nuget-name", Monikers.SharedFrameworkName,
|
||||||
"--framework-nuget-version", DependencyVersions.SharedFrameworkVersion,
|
"--framework-nuget-version", CliDependencyVersions.SharedFrameworkVersion,
|
||||||
"--previous-version-url", previousVersionURL,
|
"--previous-version-url", previousVersionURL,
|
||||||
"--obj-root", objRoot)
|
"--obj-root", objRoot)
|
||||||
.Execute()
|
.Execute()
|
||||||
|
@ -117,7 +117,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
IEnumerable<string> orderedPackageNames = new List<string>()
|
IEnumerable<string> orderedPackageNames = new List<string>()
|
||||||
{
|
{
|
||||||
Monikers.GetSdkDebianPackageName(c),
|
Monikers.GetSdkDebianPackageName(c),
|
||||||
Monikers.GetDebianSharedFrameworkPackageName(c),
|
Monikers.GetDebianSharedFrameworkPackageName(CliDependencyVersions.SharedFrameworkVersion),
|
||||||
Monikers.GetDebianSharedHostPackageName(c)
|
Monikers.GetDebianSharedHostPackageName(c)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
SharedHostComponentId = $"com.microsoft.dotnet.sharedhost.component.osx.x64";
|
SharedHostComponentId = $"com.microsoft.dotnet.sharedhost.component.osx.x64";
|
||||||
|
|
||||||
string sharedFrameworkNugetName = Monikers.SharedFrameworkName;
|
string sharedFrameworkNugetName = Monikers.SharedFrameworkName;
|
||||||
SharedFrameworkNugetVersion = DependencyVersions.SharedFrameworkVersion;
|
SharedFrameworkNugetVersion = CliDependencyVersions.SharedFrameworkVersion;
|
||||||
SharedFxComponentId = $"com.microsoft.dotnet.sharedframework.{sharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.component.osx.x64";
|
SharedFxComponentId = $"com.microsoft.dotnet.sharedframework.{sharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.component.osx.x64";
|
||||||
SharedFxPkgId = $"com.microsoft.dotnet.{sharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.osx.x64";
|
SharedFxPkgId = $"com.microsoft.dotnet.{sharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.osx.x64";
|
||||||
|
|
||||||
|
|
|
@ -119,8 +119,8 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
c.BuildContext["VersionBadge"] = Path.Combine(Dirs.Output, versionBadgeName);
|
c.BuildContext["VersionBadge"] = Path.Combine(Dirs.Output, versionBadgeName);
|
||||||
|
|
||||||
var cliVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
var cliVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
||||||
var sharedFrameworkVersion = DependencyVersions.SharedFrameworkVersion;
|
var sharedFrameworkVersion = CliDependencyVersions.SharedFrameworkVersion;
|
||||||
var hostVersion = DependencyVersions.SharedHostVersion;
|
var hostVersion = CliDependencyVersions.SharedHostVersion;
|
||||||
|
|
||||||
// Generated Installers + Archives
|
// Generated Installers + Archives
|
||||||
AddInstallerArtifactToContext(c, "dotnet-sdk", "Sdk", cliVersion);
|
AddInstallerArtifactToContext(c, "dotnet-sdk", "Sdk", cliVersion);
|
||||||
|
@ -145,11 +145,11 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[Target]
|
[Target]
|
||||||
public static BuildTargetResult DownloadHostAndSharedFxArchives(BuildTargetContext c)
|
public static BuildTargetResult DownloadHostAndSharedFxArchives(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
var sharedFrameworkVersion = DependencyVersions.SharedFrameworkVersion;
|
var sharedFrameworkVersion = CliDependencyVersions.SharedFrameworkVersion;
|
||||||
var sharedFrameworkChannel = DependencyVersions.SharedFrameworkChannel;
|
var sharedFrameworkChannel = CliDependencyVersions.SharedFrameworkChannel;
|
||||||
|
|
||||||
var combinedSharedHostAndFrameworkArchiveDownloadFile =
|
var combinedSharedHostAndFrameworkArchiveDownloadFile =
|
||||||
Path.Combine(Dirs.CoreSetupDownload, "combinedSharedHostAndFrameworkArchive");
|
Path.Combine(CliDirs.CoreSetupDownload, "combinedSharedHostAndFrameworkArchive");
|
||||||
|
|
||||||
Mkdirp(Path.GetDirectoryName(combinedSharedHostAndFrameworkArchiveDownloadFile));
|
Mkdirp(Path.GetDirectoryName(combinedSharedHostAndFrameworkArchiveDownloadFile));
|
||||||
|
|
||||||
|
@ -187,14 +187,14 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[BuildPlatforms(BuildPlatform.Windows, BuildPlatform.OSX, BuildPlatform.Ubuntu)]
|
[BuildPlatforms(BuildPlatform.Windows, BuildPlatform.OSX, BuildPlatform.Ubuntu)]
|
||||||
public static BuildTargetResult DownloadHostAndSharedFxInstallers(BuildTargetContext c)
|
public static BuildTargetResult DownloadHostAndSharedFxInstallers(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
var sharedFrameworkVersion = DependencyVersions.SharedFrameworkVersion;
|
var sharedFrameworkVersion = CliDependencyVersions.SharedFrameworkVersion;
|
||||||
var hostVersion = DependencyVersions.SharedHostVersion;
|
var hostVersion = CliDependencyVersions.SharedHostVersion;
|
||||||
|
|
||||||
var sharedFrameworkChannel = DependencyVersions.SharedFrameworkChannel;
|
var sharedFrameworkChannel = CliDependencyVersions.SharedFrameworkChannel;
|
||||||
var sharedHostChannel = DependencyVersions.SharedHostChannel;
|
var sharedHostChannel = CliDependencyVersions.SharedHostChannel;
|
||||||
|
|
||||||
var sharedFrameworkInstallerDownloadFile = Path.Combine(Dirs.CoreSetupDownload, "sharedFrameworkInstaller");
|
var sharedFrameworkInstallerDownloadFile = Path.Combine(CliDirs.CoreSetupDownload, "sharedFrameworkInstaller");
|
||||||
var sharedHostInstallerDownloadFile = Path.Combine(Dirs.CoreSetupDownload, "sharedHostInstaller");
|
var sharedHostInstallerDownloadFile = Path.Combine(CliDirs.CoreSetupDownload, "sharedHostInstaller");
|
||||||
|
|
||||||
Mkdirp(Path.GetDirectoryName(sharedFrameworkInstallerDownloadFile));
|
Mkdirp(Path.GetDirectoryName(sharedFrameworkInstallerDownloadFile));
|
||||||
Mkdirp(Path.GetDirectoryName(sharedHostInstallerDownloadFile));
|
Mkdirp(Path.GetDirectoryName(sharedHostInstallerDownloadFile));
|
||||||
|
|
|
@ -35,7 +35,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
CliVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
|
CliVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
|
||||||
CliNuGetVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
CliNuGetVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
||||||
SharedFrameworkNugetVersion = DependencyVersions.SharedFrameworkVersion;
|
SharedFrameworkNugetVersion = CliDependencyVersions.SharedFrameworkVersion;
|
||||||
Channel = c.BuildContext.Get<string>("Channel");
|
Channel = c.BuildContext.Get<string>("Channel");
|
||||||
|
|
||||||
return c.Success();
|
return c.Success();
|
||||||
|
|
|
@ -8,11 +8,5 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
public class DependencyVersions
|
public class DependencyVersions
|
||||||
{
|
{
|
||||||
public static readonly string CoreCLRVersion = "1.0.2-rc3-24127-00";
|
public static readonly string CoreCLRVersion = "1.0.2-rc3-24127-00";
|
||||||
|
|
||||||
public static readonly string SharedFrameworkVersion = "1.0.0-rc3-004324";
|
|
||||||
public static readonly string SharedHostVersion = "1.0.1-rc3-004324-00";
|
|
||||||
|
|
||||||
public static readonly string SharedFrameworkChannel = "preview";
|
|
||||||
public static readonly string SharedHostChannel = "preview";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,8 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
public static class Dirs
|
public static class Dirs
|
||||||
{
|
{
|
||||||
public static readonly string RepoRoot = Directory.GetCurrentDirectory();
|
public static readonly string RepoRoot = Directory.GetCurrentDirectory();
|
||||||
|
|
||||||
|
public static readonly string DebPackagingConfig = Path.Combine(Dirs.RepoRoot, "packaging", "deb");
|
||||||
public static readonly string Output = Path.Combine(
|
public static readonly string Output = Path.Combine(
|
||||||
RepoRoot,
|
RepoRoot,
|
||||||
"artifacts",
|
"artifacts",
|
||||||
|
@ -27,8 +29,6 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
public static readonly string CorehostLocked = Path.Combine(Output, "corehost", "locked");
|
public static readonly string CorehostLocked = Path.Combine(Output, "corehost", "locked");
|
||||||
public static readonly string CorehostLocalPackages = Path.Combine(Output, "corehost");
|
public static readonly string CorehostLocalPackages = Path.Combine(Output, "corehost");
|
||||||
public static readonly string CorehostDummyPackages = Path.Combine(Output, "corehostdummypackages");
|
public static readonly string CorehostDummyPackages = Path.Combine(Output, "corehostdummypackages");
|
||||||
|
|
||||||
public static readonly string CoreSetupDownload = Path.Combine(Intermediate, "coreSetupDownload", DependencyVersions.SharedFrameworkVersion);
|
|
||||||
public static readonly string SharedFrameworkPublish = Path.Combine(Intermediate, "sharedFrameworkPublish");
|
public static readonly string SharedFrameworkPublish = Path.Combine(Intermediate, "sharedFrameworkPublish");
|
||||||
public static readonly string TestOutput = Path.Combine(Output, "tests");
|
public static readonly string TestOutput = Path.Combine(Output, "tests");
|
||||||
public static readonly string TestArtifacts = Path.Combine(TestOutput, "artifacts");
|
public static readonly string TestArtifacts = Path.Combine(TestOutput, "artifacts");
|
||||||
|
|
|
@ -68,10 +68,8 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
return $"{packagePrefix}-dev-{nugetVersion}";
|
return $"{packagePrefix}-dev-{nugetVersion}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetDebianSharedFrameworkPackageName(BuildTargetContext c)
|
public static string GetDebianSharedFrameworkPackageName(string sharedFrameworkNugetVersion)
|
||||||
{
|
{
|
||||||
var sharedFrameworkNugetVersion = DependencyVersions.SharedFrameworkVersion;
|
|
||||||
|
|
||||||
return $"dotnet-sharedframework-{SharedFrameworkName}-{sharedFrameworkNugetVersion}".ToLower();
|
return $"dotnet-sharedframework-{SharedFrameworkName}-{sharedFrameworkNugetVersion}".ToLower();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,7 @@ namespace Microsoft.DotNet.Scripts
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Replaces version numbers that are hard-coded in DependencyVersions.cs.
|
/// Replaces version numbers that are hard-coded in DependencyVersions.cs and CliDependencyVersions.cs.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Target]
|
[Target]
|
||||||
public static BuildTargetResult ReplaceDependencyVersions(BuildTargetContext c)
|
public static BuildTargetResult ReplaceDependencyVersions(BuildTargetContext c)
|
||||||
|
@ -196,9 +196,16 @@ namespace Microsoft.DotNet.Scripts
|
||||||
ReplaceFileContents(@"build_projects\shared-build-targets-utils\DependencyVersions.cs", fileContents =>
|
ReplaceFileContents(@"build_projects\shared-build-targets-utils\DependencyVersions.cs", fileContents =>
|
||||||
{
|
{
|
||||||
DependencyInfo coreFXInfo = c.GetCoreFXDependency();
|
DependencyInfo coreFXInfo = c.GetCoreFXDependency();
|
||||||
DependencyInfo coreSetupInfo = c.GetCoreSetupDependency();
|
|
||||||
|
|
||||||
fileContents = ReplaceDependencyVersion(fileContents, coreFXInfo, "CoreCLRVersion", "Microsoft.NETCore.Runtime.CoreCLR");
|
fileContents = ReplaceDependencyVersion(fileContents, coreFXInfo, "CoreCLRVersion", "Microsoft.NETCore.Runtime.CoreCLR");
|
||||||
|
|
||||||
|
return fileContents;
|
||||||
|
});
|
||||||
|
|
||||||
|
ReplaceFileContents(@"build_projects\dotnet-cli-build\CliDependencyVersions.cs", fileContents =>
|
||||||
|
{
|
||||||
|
DependencyInfo coreSetupInfo = c.GetCoreSetupDependency();
|
||||||
|
|
||||||
fileContents = ReplaceDependencyVersion(fileContents, coreSetupInfo, "SharedFrameworkVersion", "Microsoft.NETCore.App");
|
fileContents = ReplaceDependencyVersion(fileContents, coreSetupInfo, "SharedFrameworkVersion", "Microsoft.NETCore.App");
|
||||||
fileContents = ReplaceDependencyVersion(fileContents, coreSetupInfo, "SharedHostVersion", "Microsoft.NETCore.DotNetHost");
|
fileContents = ReplaceDependencyVersion(fileContents, coreSetupInfo, "SharedHostVersion", "Microsoft.NETCore.DotNetHost");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue