Add publishing for sdk, sharedhost, sharedfx deb files
small fix disable dotnet-nightly train avoidance, alawys use the same debian config for now
This commit is contained in:
parent
1c38b17f8b
commit
96664f31c2
4 changed files with 48 additions and 10 deletions
|
@ -33,10 +33,6 @@
|
||||||
"%SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME%" : {}
|
"%SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME%" : {}
|
||||||
},
|
},
|
||||||
|
|
||||||
"package_conflicts" : [
|
|
||||||
"dotnet-dev-nightly"
|
|
||||||
],
|
|
||||||
|
|
||||||
"symlinks": {
|
"symlinks": {
|
||||||
"bin/dotnet-compile-native" : "/usr/bin/dotnet-compile-native"
|
"bin/dotnet-compile-native" : "/usr/bin/dotnet-compile-native"
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,7 +168,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
{
|
{
|
||||||
IEnumerable<string> orderedPackageNames = new List<string>()
|
IEnumerable<string> orderedPackageNames = new List<string>()
|
||||||
{
|
{
|
||||||
Monikers.GetDebianPackageName(c),
|
Monikers.GetSdkDebianPackageName(c),
|
||||||
Monikers.GetDebianSharedFrameworkPackageName(c),
|
Monikers.GetDebianSharedFrameworkPackageName(c),
|
||||||
Monikers.GetDebianSharedHostPackageName(c)
|
Monikers.GetDebianSharedHostPackageName(c)
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[Target(
|
[Target(
|
||||||
nameof(PublishTargets.PublishVersionBadge),
|
nameof(PublishTargets.PublishVersionBadge),
|
||||||
nameof(PublishTargets.PublishSdkInstallerFile),
|
nameof(PublishTargets.PublishSdkInstallerFile),
|
||||||
//nameof(PublishTargets.PublishDebFileToDebianRepo),
|
nameof(PublishTargets.PublishDebFilesToDebianRepo),
|
||||||
nameof(PublishTargets.PublishCombinedFrameworkSDKHostFile),
|
nameof(PublishTargets.PublishCombinedFrameworkSDKHostFile),
|
||||||
nameof(PublishTargets.PublishCombinedFrameworkHostFile),
|
nameof(PublishTargets.PublishCombinedFrameworkHostFile),
|
||||||
nameof(PublishTargets.PublishLatestVersionTextFile))]
|
nameof(PublishTargets.PublishLatestVersionTextFile))]
|
||||||
|
@ -93,11 +93,21 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
return c.Success();
|
return c.Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Target(nameof(PublishSdkInstallerFile))]
|
[Target(
|
||||||
|
nameof(PublishSdkDebToDebianRepo),
|
||||||
|
nameof(PublishSharedFrameworkDebToDebianRepo),
|
||||||
|
nameof(PublishSharedHostDebToDebianRepo))]
|
||||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||||
public static BuildTargetResult PublishDebFileToDebianRepo(BuildTargetContext c)
|
public static BuildTargetResult PublishDebFilesToDebianRepo(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
var packageName = Monikers.GetDebianPackageName(c);
|
return c.Success();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Target]
|
||||||
|
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||||
|
public static BuildTargetResult PublishSdkDebToDebianRepo(BuildTargetContext c)
|
||||||
|
{
|
||||||
|
var packageName = Monikers.GetSdkDebianPackageName(c);
|
||||||
var installerFile = c.BuildContext.Get<string>("SdkInstallerFile");
|
var installerFile = c.BuildContext.Get<string>("SdkInstallerFile");
|
||||||
var uploadUrl = $"https://dotnetcli.blob.core.windows.net/dotnet/{Channel}/Installers/{Version}/{Path.GetFileName(installerFile)}";
|
var uploadUrl = $"https://dotnetcli.blob.core.windows.net/dotnet/{Channel}/Installers/{Version}/{Path.GetFileName(installerFile)}";
|
||||||
var uploadJson = GenerateUploadJsonFile(packageName, Version, uploadUrl);
|
var uploadJson = GenerateUploadJsonFile(packageName, Version, uploadUrl);
|
||||||
|
@ -109,6 +119,38 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
return c.Success();
|
return c.Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Target]
|
||||||
|
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||||
|
public static BuildTargetResult PublishSharedFrameworkDebToDebianRepo(BuildTargetContext c)
|
||||||
|
{
|
||||||
|
var packageName = Monikers.GetDebianSharedFrameworkPackageName(c);
|
||||||
|
var installerFile = c.BuildContext.Get<string>("SharedFrameworkInstallerFile");
|
||||||
|
var uploadUrl = $"https://dotnetcli.blob.core.windows.net/dotnet/{Channel}/Installers/{Version}/{Path.GetFileName(installerFile)}";
|
||||||
|
var uploadJson = GenerateUploadJsonFile(packageName, Version, uploadUrl);
|
||||||
|
|
||||||
|
Cmd(Path.Combine(Dirs.RepoRoot, "scripts", "publish", "repoapi_client.sh"), "-addpkg", uploadJson)
|
||||||
|
.Execute()
|
||||||
|
.EnsureSuccessful();
|
||||||
|
|
||||||
|
return c.Success();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Target]
|
||||||
|
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||||
|
public static BuildTargetResult PublishSharedHostDebToDebianRepo(BuildTargetContext c)
|
||||||
|
{
|
||||||
|
var packageName = Monikers.GetDebianSharedHostPackageName(c);
|
||||||
|
var installerFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
|
||||||
|
var uploadUrl = $"https://dotnetcli.blob.core.windows.net/dotnet/{Channel}/Installers/{Version}/{Path.GetFileName(installerFile)}";
|
||||||
|
var uploadJson = GenerateUploadJsonFile(packageName, Version, uploadUrl);
|
||||||
|
|
||||||
|
Cmd(Path.Combine(Dirs.RepoRoot, "scripts", "publish", "repoapi_client.sh"), "-addpkg", uploadJson)
|
||||||
|
.Execute()
|
||||||
|
.EnsureSuccessful();
|
||||||
|
|
||||||
|
return c.Success();
|
||||||
|
}
|
||||||
|
|
||||||
[Target]
|
[Target]
|
||||||
[Environment("DOCKER_HUB_REPO")]
|
[Environment("DOCKER_HUB_REPO")]
|
||||||
[Environment("DOCKER_HUB_TRIGGER_TOKEN")]
|
[Environment("DOCKER_HUB_TRIGGER_TOKEN")]
|
||||||
|
|
|
@ -167,7 +167,7 @@ copy_files_to_debian_layout(){
|
||||||
cp -a "$REPO_BINARIES_DIR/." "$PACKAGE_LAYOUT_DIR/package_root"
|
cp -a "$REPO_BINARIES_DIR/." "$PACKAGE_LAYOUT_DIR/package_root"
|
||||||
|
|
||||||
# Copy config file
|
# Copy config file
|
||||||
cp "$PACKAGING_ROOT/$DOTNET_DEB_PACKAGE_NAME-debian_config.json" "$PACKAGE_LAYOUT_DIR/debian_config.json"
|
cp "$PACKAGING_ROOT/dotnet-debian_config.json" "$PACKAGE_LAYOUT_DIR/debian_config.json"
|
||||||
|
|
||||||
# Copy Manpages
|
# Copy Manpages
|
||||||
cp -a "$MANPAGE_DIR/." "$PACKAGE_LAYOUT_DIR/docs"
|
cp -a "$MANPAGE_DIR/." "$PACKAGE_LAYOUT_DIR/docs"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue