diff --git a/build_projects/dotnet-host-build/CompileTargets.cs b/build_projects/dotnet-host-build/CompileTargets.cs index 2f5fab5a23..4b28d62bb1 100644 --- a/build_projects/dotnet-host-build/CompileTargets.cs +++ b/build_projects/dotnet-host-build/CompileTargets.cs @@ -28,7 +28,9 @@ public class CompileTargets { "win10-arm64", "win10-arm64" }, { "osx.10.10-x64", "osx.10.10-x64" }, { "osx.10.11-x64", "osx.10.10-x64" }, + { "ubuntu.14.04-arm", "ubuntu.14.04-arm" }, { "ubuntu.14.04-x64", "ubuntu.14.04-x64" }, + { "ubuntu.16.04-arm", "ubuntu.16.04-arm" }, { "ubuntu.16.04-x64", "ubuntu.16.04-x64" }, { "ubuntu.16.10-x64", "ubuntu.16.10-x64" }, { "centos.7-x64", "rhel.7-x64" }, @@ -386,10 +388,23 @@ public static BuildTargetResult PackagePkgProjects(BuildTargetContext c) var hostNugetversion = hostVersion.LatestHostVersion.ToString(); var content = $@"{c.BuildContext["CommitHash"]}{Environment.NewLine}{hostNugetversion}{Environment.NewLine}"; var pkgDir = Path.Combine(c.BuildContext.BuildDirectory, "pkg"); - var packCmd = "pack." + (CurrentPlatform.IsWindows ? "cmd" : "sh"); string rid = HostPackageSupportedRids[c.BuildContext.Get("TargetRID")]; File.WriteAllText(Path.Combine(pkgDir, "version.txt"), content); - Exec(Path.Combine(pkgDir, packCmd)); + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + Exec(Path.Combine(pkgDir, "pack.cmd")); + } + else + { + List buildScriptArgList = new List(); + string buildScriptFile = Path.Combine(pkgDir, "pack.sh"); + + buildScriptArgList.Add("--rid"); + buildScriptArgList.Add(rid); + + Exec(buildScriptFile, buildScriptArgList); + } foreach (var file in Directory.GetFiles(Path.Combine(pkgDir, "bin", "packages"), "*.nupkg")) { diff --git a/pkg/pack.sh b/pkg/pack.sh index 1e9ee02038..63c1a2c68e 100755 --- a/pkg/pack.sh +++ b/pkg/pack.sh @@ -11,6 +11,16 @@ init_distro_name() fi } +usage() +{ + echo "Usage: $0 --rid " + echo "" + echo "Options:" + echo " --rid Target Runtime Identifier" + + exit 1 +} + set -e # determine current directory @@ -25,6 +35,23 @@ done __project_dir="$( cd -P "$( dirname "$SOURCE" )" && pwd )" __distro_rid= +while [ "$1" != "" ]; do + lowerI="$(echo $1 | awk '{print tolower($0)}')" + case $lowerI in + -h|--help) + usage + exit 1 + ;; + --rid) + shift + __distro_rid=$1 + ;; + *) + echo "Unknown argument to pack.sh $1"; exit 1 + esac + shift +done + # setup msbuild "$__project_dir/init-tools.sh" @@ -44,7 +71,9 @@ if [ "$(uname -s)" == "Darwin" ]; then __targets_param="TargetsOSX=true" else __targets_param="TargetsLinux=true" - init_distro_name + if [ -z $__distro_rid ]; then + init_distro_name + fi fi __common_parameters="/p:$__targets_param /p:DistroRid=$__distro_rid /verbosity:minimal" diff --git a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.builds b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.builds index 933cdb3fdf..8ce91f2ec8 100644 --- a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.builds +++ b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.builds @@ -31,10 +31,18 @@ Linux amd64 + + Linux + arm + Linux amd64 + + Linux + arm + Linux amd64 diff --git a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostPolicy.builds b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostPolicy.builds index e8fdd48cd7..2f12b2766b 100644 --- a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostPolicy.builds +++ b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostPolicy.builds @@ -31,10 +31,18 @@ Linux amd64 + + Linux + arm + Linux amd64 + + Linux + arm + Linux amd64 diff --git a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostResolver.builds b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostResolver.builds index 5f7fd16387..ffef995270 100644 --- a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostResolver.builds +++ b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostResolver.builds @@ -31,10 +31,18 @@ Linux amd64 + + Linux + arm + Linux amd64 + + Linux + arm + Linux amd64