From 6ed82a1a3f8d95abc5d16d9d80da4708ead03f29 Mon Sep 17 00:00:00 2001 From: Bryan Thornbury Date: Tue, 22 Mar 2016 11:14:29 -0700 Subject: [PATCH] put all deb packages in the same root, small fix to package tool, renable upgrade tests --- packaging/debian/dotnet-debian_config.json | 4 ++-- packaging/debian/dotnet-nightly-debian_config.json | 2 +- .../debian/dotnet-sharedframework-debian_config.json | 2 +- scripts/dotnet-cli-build/DebTargets.cs | 2 +- scripts/package/package-debian.sh | 8 +++++--- tools/DebianPackageTool/package_tool | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/packaging/debian/dotnet-debian_config.json b/packaging/debian/dotnet-debian_config.json index 3ce0f070b..7cef71bf1 100644 --- a/packaging/debian/dotnet-debian_config.json +++ b/packaging/debian/dotnet-debian_config.json @@ -3,7 +3,7 @@ "maintainer_email": "dotnetcore@microsoft.com", "package_name": "dotnet-dev-%SDK_NUGET_VERSION%", - "install_root": "/usr/share/dotnet/sdk/%SDK_NUGET_VERSION%", + "install_root": "/usr/share/dotnet", "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.", @@ -30,7 +30,7 @@ "debian_dependencies":{ "clang-3.5" : {}, - "SHARED_FRAMEWORK_NUGET_NAME" : {} + "%SHARED_FRAMEWORK_NUGET_NAME%" : {} }, "package_conflicts" : [ diff --git a/packaging/debian/dotnet-nightly-debian_config.json b/packaging/debian/dotnet-nightly-debian_config.json index fa1d47bb0..fb7b609ee 100644 --- a/packaging/debian/dotnet-nightly-debian_config.json +++ b/packaging/debian/dotnet-nightly-debian_config.json @@ -29,7 +29,7 @@ "debian_dependencies":{ "clang-3.5" : {}, - "SHARED_FRAMEWORK_NUGET_NAME" : {} + "%SHARED_FRAMEWORK_NUGET_NAME%" : {} }, "package_conflicts" : [ diff --git a/packaging/sharedframework/debian/dotnet-sharedframework-debian_config.json b/packaging/sharedframework/debian/dotnet-sharedframework-debian_config.json index 07fcfe90c..588e20981 100644 --- a/packaging/sharedframework/debian/dotnet-sharedframework-debian_config.json +++ b/packaging/sharedframework/debian/dotnet-sharedframework-debian_config.json @@ -3,7 +3,7 @@ "maintainer_email": "dotnetcore@microsoft.com", "package_name": "%SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME%", - "install_root": "/usr/share/dotnet/shared/%SHARED_FRAMEWORK_NUGET_NAME%/%SHARED_FRAMEWORK_NUGET_VERSION%", + "install_root": "/usr/share/dotnet", "short_description": ".NET Core Shared Framework %SHARED_FRAMEWORK_NUGET_NAME% %SHARED_FRAMEWORK_NUGET_VERSION%", "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 a runtime and framework which can be used by .NET Core applications.", diff --git a/scripts/dotnet-cli-build/DebTargets.cs b/scripts/dotnet-cli-build/DebTargets.cs index 38a67b2aa..32027bd92 100644 --- a/scripts/dotnet-cli-build/DebTargets.cs +++ b/scripts/dotnet-cli-build/DebTargets.cs @@ -49,7 +49,7 @@ namespace Microsoft.DotNet.Cli.Build "-m", manPagesDir, "--framework-nuget-name", Monikers.SharedFrameworkName, "--framework-nuget-version", c.BuildContext.Get("SharedFrameworkNugetVersion"), - //"--previous-version-url", previousVersionURL, + "--previous-version-url", previousVersionURL, "--obj-root", objRoot) .Execute() .EnsureSuccessful(); diff --git a/scripts/package/package-debian.sh b/scripts/package/package-debian.sh index 2d86b152c..702c628ef 100755 --- a/scripts/package/package-debian.sh +++ b/scripts/package/package-debian.sh @@ -106,6 +106,10 @@ parseargs(){ echo "Provide the NuGet name of the targetted Shared Framework. Missing option '--framework-nuget-name'" && help fi + if [ -z "$PREVIOUS_VERSION_URL" ]; then + 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_VERSION" ]; then echo "Provide the NuGet version of the targetted Shared Framework. Missing option '--framework-nuget-version'" && help fi @@ -195,9 +199,7 @@ install_bats() { run_package_integrity_tests() { # Set LAST_VERSION_URL to enable upgrade tests - if [ -z "$PREVIOUS_VERSION_URL" ]; then - export LAST_VERSION_URL="$PREVIOUS_VERSION_URL" - fi + export LAST_VERSION_URL="$PREVIOUS_VERSION_URL" $TEST_STAGE_DIR/bin/bats $PACKAGE_OUTPUT_DIR/test_package.bats } diff --git a/tools/DebianPackageTool/package_tool b/tools/DebianPackageTool/package_tool index 3cc139878..cf0aa72a7 100755 --- a/tools/DebianPackageTool/package_tool +++ b/tools/DebianPackageTool/package_tool @@ -218,7 +218,7 @@ package_docs(){ ## Generation Functions ## generate_config_templates(){ - python ${SCRIPT_DIR}/scripts/config_template_generator.py $CONFIG $SCRIPT_DIR/templates/debian $DEBIAN_DIR $PACKAGE_VERSION + python ${SCRIPT_DIR}/scripts/config_template_generator.py $CONFIG $SCRIPT_DIR/templates/debian $DEBIAN_DIR $PACKAGE_NAME $PACKAGE_VERSION } generate_manpages(){