public static BuildTargetResult GenerateSdkDeb(BuildTargetContext c) { // Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools // So we need to skip this target if the tools aren't present. // https://github.com/dotnet/core-setup/issues/167 if (DebuildNotPresent()) { c.Info("Debuild not present, skipping target: {nameof(RemovePackages)}"); return c.Success(); } var channel = c.BuildContext.Get<string>("Channel").ToLower(); var packageName = CliMonikers.GetSdkDebianPackageName(c); var version = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion; var debFile = c.BuildContext.Get<string>("SdkInstallerFile"); var manPagesDir = Path.Combine(Dirs.RepoRoot, "Documentation", "manpages"); var sdkPublishRoot = c.BuildContext.Get<string>("CLISDKRoot"); var sharedFxDebianPackageName = Monikers.GetDebianSharedFrameworkPackageName(CliDependencyVersions.SharedFrameworkVersion); var debianConfigFile = Path.Combine(Dirs.DebPackagingConfig, "dotnet-debian_config.json"); var postinstallFile = Path.Combine(Dirs.DebPackagingConfig, "postinst"); var debianConfigVariables = new Dictionary<string, string>() { { "SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME", sharedFxDebianPackageName }, { "SHARED_FRAMEWORK_NUGET_NAME", Monikers.SharedFrameworkName }, { "SHARED_FRAMEWORK_NUGET_VERSION", CliDependencyVersions.SharedFrameworkVersion }, { "SHARED_FRAMEWORK_BRAND_NAME", Monikers.SharedFxBrandName }, { "SDK_NUGET_VERSION", version }, { "CLI_SDK_BRAND_NAME", Monikers.CLISdkBrandName } }; var debCreator = new DebPackageCreator( DotNetCli.Stage2, Dirs.Intermediate); debCreator.CreateDeb( debianConfigFile, packageName, version, sdkPublishRoot, debianConfigVariables, debFile, manpagesDirectory: manPagesDir, versionManpages: true, debianFiles: new string[] { postinstallFile }); return c.Success(); }
public static BuildTargetResult GenerateSdkDeb(BuildTargetContext c) { // Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools // So we need to skip this target if the tools aren't present. // https://github.com/dotnet/core-setup/issues/167 if (DebuildNotPresent()) { c.Info("Debuild not present, skipping target: {nameof(RemovePackages)}"); return(c.Success()); } var channel = c.BuildContext.Get <string>("Channel").ToLower(); var packageName = CliMonikers.GetSdkDebianPackageName(c); var version = c.BuildContext.Get <BuildVersion>("BuildVersion").NuGetVersion; var debFile = c.BuildContext.Get <string>("SdkInstallerFile"); var manPagesDir = Path.Combine(Dirs.RepoRoot, "Documentation", "manpages"); var sdkPublishRoot = c.BuildContext.Get <string>("CLISDKRoot"); var sharedFxDebianPackageName = Monikers.GetDebianSharedFrameworkPackageName(CliDependencyVersions.SharedFrameworkVersion); var debianConfigFile = Path.Combine(Dirs.DebPackagingConfig, "dotnet-debian_config.json"); var postinstallFile = Path.Combine(Dirs.DebPackagingConfig, "postinst"); var debianConfigVariables = new Dictionary <string, string>() { { "SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME", sharedFxDebianPackageName }, { "SHARED_FRAMEWORK_NUGET_NAME", Monikers.SharedFrameworkName }, { "SHARED_FRAMEWORK_NUGET_VERSION", CliDependencyVersions.SharedFrameworkVersion }, { "SHARED_FRAMEWORK_BRAND_NAME", Monikers.SharedFxBrandName }, { "SDK_NUGET_VERSION", version }, { "CLI_SDK_BRAND_NAME", Monikers.CLISdkBrandName } }; var debCreator = new DebPackageCreator( DotNetCli.Stage2, Dirs.Intermediate); debCreator.CreateDeb( debianConfigFile, packageName, version, sdkPublishRoot, debianConfigVariables, debFile, manpagesDirectory: manPagesDir, versionManpages: true, debianFiles: new string[] { postinstallFile }); return(c.Success()); }