Address more PR feedback
- Add libssl-dev dependency to DockerFile, because the package upgrade test still depend on this. It can be removed once a newer package without libssl-dev dependency is uploaded. - Check pre-reqs in the package script.
This commit is contained in:
parent
1737fa8cbc
commit
53dd5f4a23
4 changed files with 45 additions and 13 deletions
|
@ -55,6 +55,7 @@ RUN echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.6 main" | tee
|
||||||
libsasl2-2 \
|
libsasl2-2 \
|
||||||
libsqlite3-0 \
|
libsqlite3-0 \
|
||||||
libssl1.0.0 \
|
libssl1.0.0 \
|
||||||
|
libssl-dev \
|
||||||
libtasn1-6 \
|
libtasn1-6 \
|
||||||
libwind0-heimdal
|
libwind0-heimdal
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,10 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
var version = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
|
var version = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
|
||||||
var debFile = c.BuildContext.Get<string>("InstallerFile");
|
var debFile = c.BuildContext.Get<string>("InstallerFile");
|
||||||
var manPagesDir = Path.Combine(Dirs.RepoRoot, "Documentation", "manpages");
|
var manPagesDir = Path.Combine(Dirs.RepoRoot, "Documentation", "manpages");
|
||||||
|
var previousVersionURL = $"https://dotnetcli.blob.core.windows.net/dotnet/{channel}/Installers/Latest/dotnet-ubuntu-x64.latest.deb";
|
||||||
|
|
||||||
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, "-c", channel)
|
"-v", version, "-i", Dirs.Stage2, "-o", debFile, "-p", packageName, "-m", manPagesDir, "--previous-version-url", previousVersionURL)
|
||||||
.Execute()
|
.Execute()
|
||||||
.EnsureSuccessful();
|
.EnsureSuccessful();
|
||||||
return c.Success();
|
return c.Success();
|
||||||
|
|
|
@ -33,7 +33,6 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Exception($"Unknown channel - {channel}");
|
throw new Exception($"Unknown channel - {channel}");
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return packageName;
|
return packageName;
|
||||||
|
|
|
@ -25,16 +25,18 @@ help(){
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " --version <version> Specify a version for the package."
|
echo " --version <version> Specify a version for the package."
|
||||||
echo " --input <input directory> Package the entire contents of the directory tree."
|
echo " --input <input directory> Package the entire contents of the directory tree."
|
||||||
echo " --manpages <man pages directory> Directory containing man pages for the package."
|
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 " --channel <channel> Channel against which to run the upgrade tests. Example - 'dev', 'beta'"
|
echo " --previous-version-url <url> Url to the previous version of the debian packge against which to run the upgrade tests."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
while [[ $# > 0 ]]; do
|
parseargs(){
|
||||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
|
||||||
case $lowerI in
|
while [[ $# > 0 ]]; do
|
||||||
|
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||||
|
case $lowerI in
|
||||||
-m|--manpages)
|
-m|--manpages)
|
||||||
MANPAGE_DIR=$2
|
MANPAGE_DIR=$2
|
||||||
shift
|
shift
|
||||||
|
@ -55,8 +57,8 @@ while [[ $# > 0 ]]; do
|
||||||
DOTNET_CLI_VERSION=$2
|
DOTNET_CLI_VERSION=$2
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-c|--channel)
|
--previous-version-url)
|
||||||
CHANNEL=$2
|
PREVIOUS_VERSION_URL=$2
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--help)
|
--help)
|
||||||
|
@ -65,9 +67,38 @@ while [[ $# > 0 ]]; do
|
||||||
*)
|
*)
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ -z "$DOTNET_CLI_VERSION" ]; then
|
||||||
|
echo "Provide a version number. Missing option '--version'" && help
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$OUTPUT_DEBIAN_FILE" ]; then
|
||||||
|
echo "Provide an output deb. Missing option '--output'" && help
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$REPO_BINARIES_DIR" ]; then
|
||||||
|
echo "Provide an input directory. Missing option '--input'" && help
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DOTNET_DEB_PACKAGE_NAME" ]; then
|
||||||
|
echo "Provide an the name for the debian package. Missing option '--package-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 [ ! -d "$REPO_BINARIES_DIR" ]; then
|
||||||
|
echo "'$REPO_BINARIES_DIR' - is either missing or not a directory" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
parseargs $@
|
||||||
|
|
||||||
PACKAGING_ROOT="$REPOROOT/packaging/debian"
|
PACKAGING_ROOT="$REPOROOT/packaging/debian"
|
||||||
PACKAGING_TOOL_DIR="$REPOROOT/tools/DebianPackageTool"
|
PACKAGING_TOOL_DIR="$REPOROOT/tools/DebianPackageTool"
|
||||||
|
@ -148,7 +179,7 @@ remove_debian_package() {
|
||||||
|
|
||||||
run_package_integrity_tests() {
|
run_package_integrity_tests() {
|
||||||
# Set LAST_VERSION_URL to enable upgrade tests
|
# Set LAST_VERSION_URL to enable upgrade tests
|
||||||
export LAST_VERSION_URL="https://dotnetcli.blob.core.windows.net/dotnet/$CHANNEL/Installers/Latest/dotnet-ubuntu-x64.latest.deb"
|
export LAST_VERSION_URL="$PREVIOUS_VERSION_URL"
|
||||||
|
|
||||||
$TEST_STAGE_DIR/bin/bats $PACKAGE_OUTPUT_DIR/test_package.bats
|
$TEST_STAGE_DIR/bin/bats $PACKAGE_OUTPUT_DIR/test_package.bats
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue