Reference Shared Framework from Shared Host
This commit is contained in:
parent
63585087f8
commit
e1ba3f23ef
4 changed files with 31 additions and 11 deletions
|
@ -2,7 +2,8 @@
|
|||
"maintainer_name":"Microsoft",
|
||||
"maintainer_email": "dotnetcore@microsoft.com",
|
||||
|
||||
"package_name": "dotnet",
|
||||
"package_name": "dotnet-dev-%SDK_NUGET_VERSION%",
|
||||
"install_root": "/usr/share/dotnet/sdk/%SDK_NUGET_VERSION%",
|
||||
|
||||
"short_description": ".NET Core & command line tools",
|
||||
"long_description": ".NET Core is a cross-platform implementation of .NET Framework, a modern, modular platform\n for building diverse kinds of applications, from command-line applications to microservices and \n modern websites.\n This package contains the tools you will need to start writing applications for .NET Core. It includes \n compilers, package managers and other utilities that developers need.",
|
||||
|
@ -33,7 +34,7 @@
|
|||
},
|
||||
|
||||
"package_conflicts" : [
|
||||
"dotnet-nightly"
|
||||
"dotnet-dev-nightly"
|
||||
],
|
||||
|
||||
"symlinks": {
|
||||
|
|
|
@ -42,7 +42,15 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
Directory.CreateDirectory(objRoot);
|
||||
|
||||
Cmd(Path.Combine(Dirs.RepoRoot, "scripts", "package", "package-debian.sh"),
|
||||
"-v", version, "-i", Dirs.Stage2, "-o", debFile, "-p", packageName, "-m", manPagesDir, "--previous-version-url", previousVersionURL, "--obj-root", objRoot)
|
||||
"-v", version,
|
||||
"-i", Dirs.Stage2,
|
||||
"-o", debFile,
|
||||
"-p", packageName,
|
||||
"-m", manPagesDir,
|
||||
"--framework-nuget-name", Monikers.SharedFrameworkName,
|
||||
"--framework-nuget-version", c.BuildContext.Get<string>("SharedFrameworkNugetVersion"),
|
||||
"--previous-version-url", previousVersionURL,
|
||||
"--obj-root", objRoot)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
return c.Success();
|
||||
|
|
|
@ -101,16 +101,16 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Failed($"Stage 0 directory does not exist: {stage0}");
|
||||
}
|
||||
|
||||
// // Identify the version
|
||||
// string versionFile = Directory.GetFiles(stage0, ".version", SearchOption.AllDirectories).FirstOrDefault();
|
||||
// Identify the version
|
||||
string versionFile = Directory.GetFiles(stage0, ".version", SearchOption.AllDirectories).FirstOrDefault();
|
||||
|
||||
// if (string.IsNullOrEmpty(versionFile))
|
||||
// {
|
||||
// throw new Exception($"'.version' file not found in '{stage0}' folder");
|
||||
// }
|
||||
if (string.IsNullOrEmpty(versionFile))
|
||||
{
|
||||
throw new Exception($"'.version' file not found in '{stage0}' folder");
|
||||
}
|
||||
|
||||
// var version = File.ReadAllLines(versionFile);
|
||||
// c.Info($"Using Stage 0 Version: {version[1]}");
|
||||
var version = File.ReadAllLines(versionFile);
|
||||
c.Info($"Using Stage 0 Version: {version[1]}");
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
|
|
@ -28,6 +28,8 @@ help(){
|
|||
echo " --manpages <man pages directory> Directory containing man pages for the package (Optional)."
|
||||
echo " --output <output debfile> The full path to which the package will be written."
|
||||
echo " --package-name <package name> Package to identify during installation. Example - 'dotnet-nightly', 'dotnet'"
|
||||
echo " --framework-nuget-name <name> The name of the nuget package that produced this shared framework."
|
||||
echo " --framework-nuget-version <ver> The versionf of the nuget package that produced this shared framework."
|
||||
echo " --previous-version-url <url> Url to the previous version of the debian packge against which to run the upgrade tests."
|
||||
echo " --obj-root <object root> Root folder for intermediate objects."
|
||||
exit 1
|
||||
|
@ -104,6 +106,14 @@ parseargs(){
|
|||
echo "Provide a URL to the previous debian pacakge (Required for running upgrade tests). Missing option '--previous-version-url'" && help
|
||||
fi
|
||||
|
||||
if [ -z "$SHARED_FRAMEWORK_NUGET_NAME" ]; then
|
||||
echo "Provide the NuGet name of the targetted Shared Framework. Missing option '--framework-nuget-name'" && help
|
||||
fi
|
||||
|
||||
if [ -z "$SHARED_FRAMEWORK_NUGET_VERSION" ]; then
|
||||
echo "Provide the NuGet version of the targetted Shared Framework. Missing option '--framework-nuget-version'" && help
|
||||
fi
|
||||
|
||||
if [ ! -d "$REPO_BINARIES_DIR" ]; then
|
||||
echo "'$REPO_BINARIES_DIR' - is either missing or not a directory" 1>&2
|
||||
exit 1
|
||||
|
@ -172,6 +182,7 @@ update_debian_json()
|
|||
header "Updating debian.json file"
|
||||
sed -i "s/%SHARED_FRAMEWORK_NUGET_NAME%/$SHARED_FRAMEWORK_NUGET_NAME/g" "$PACKAGE_LAYOUT_DIR"/debian_config.json
|
||||
sed -i "s/%SHARED_FRAMEWORK_NUGET_VERSION%/$SHARED_FRAMEWORK_NUGET_VERSION/g" "$PACKAGE_LAYOUT_DIR"/debian_config.json
|
||||
sed -i "s/%SDK_NUGET_VERSION%/$DOTNET_CLI_VERSION/g" "$PACKAGE_LAYOUT_DIR"/debian_config.json
|
||||
}
|
||||
|
||||
test_debian_package(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue