Reference Shared Framework from Shared Host

This commit is contained in:
Piotr Puszkiewicz 2016-03-18 01:54:40 -07:00 committed by Bryan Thornbury
parent 63585087f8
commit e1ba3f23ef
4 changed files with 31 additions and 11 deletions

View file

@ -2,7 +2,8 @@
"maintainer_name":"Microsoft", "maintainer_name":"Microsoft",
"maintainer_email": "dotnetcore@microsoft.com", "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", "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.", "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" : [ "package_conflicts" : [
"dotnet-nightly" "dotnet-dev-nightly"
], ],
"symlinks": { "symlinks": {

View file

@ -42,7 +42,15 @@ namespace Microsoft.DotNet.Cli.Build
Directory.CreateDirectory(objRoot); Directory.CreateDirectory(objRoot);
Cmd(Path.Combine(Dirs.RepoRoot, "scripts", "package", "package-debian.sh"), 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() .Execute()
.EnsureSuccessful(); .EnsureSuccessful();
return c.Success(); return c.Success();

View file

@ -101,16 +101,16 @@ namespace Microsoft.DotNet.Cli.Build
return c.Failed($"Stage 0 directory does not exist: {stage0}"); return c.Failed($"Stage 0 directory does not exist: {stage0}");
} }
// // Identify the version // Identify the version
// string versionFile = Directory.GetFiles(stage0, ".version", SearchOption.AllDirectories).FirstOrDefault(); string versionFile = Directory.GetFiles(stage0, ".version", SearchOption.AllDirectories).FirstOrDefault();
// if (string.IsNullOrEmpty(versionFile)) if (string.IsNullOrEmpty(versionFile))
// { {
// throw new Exception($"'.version' file not found in '{stage0}' folder"); throw new Exception($"'.version' file not found in '{stage0}' folder");
// } }
// var version = File.ReadAllLines(versionFile); var version = File.ReadAllLines(versionFile);
// c.Info($"Using Stage 0 Version: {version[1]}"); c.Info($"Using Stage 0 Version: {version[1]}");
return c.Success(); return c.Success();
} }

View file

@ -28,6 +28,8 @@ help(){
echo " --manpages <man pages directory> Directory containing man pages for the package (Optional)." 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 " --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 " --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 " --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." echo " --obj-root <object root> Root folder for intermediate objects."
exit 1 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 echo "Provide a URL to the previous debian pacakge (Required for running upgrade tests). Missing option '--previous-version-url'" && help
fi 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 if [ ! -d "$REPO_BINARIES_DIR" ]; then
echo "'$REPO_BINARIES_DIR' - is either missing or not a directory" 1>&2 echo "'$REPO_BINARIES_DIR' - is either missing or not a directory" 1>&2
exit 1 exit 1
@ -172,6 +182,7 @@ update_debian_json()
header "Updating debian.json file" 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_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/%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(){ test_debian_package(){