5 echo "Builds the NuGet packages from the binaries that were built in the Build product binaries step."
6 echo "Usage: build-packages -BuildArch -BuildType [portableLinux]"
7 echo "BuildArch can be x64, x86, arm, arm64 (default is x64)"
8 echo "BuildType can be release, checked, debug (default is debug)"
9 echo "portableLinux - build for Portable Linux Distribution"
14 __ProjectRoot="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
17 # Use uname to determine what the OS is.
51 echo "Unsupported OS $OSName detected, configuring as if for Linux"
70 unprocessedBuildArgs="$unprocessedBuildArgs $1"
71 __Arch=$(echo $1| cut -d'=' -f 2)
75 if [ "$__BuildOS" == "Linux" ]; then
78 echo "ERROR: portableLinux not supported for non-Linux platforms."
83 unprocessedBuildArgs="$unprocessedBuildArgs $1"
88 # Portable builds target the base RID only for Linux based platforms
89 if [ $__PortableLinux == 1 ]; then
90 export __DistroRid="linux-$__Arch"
92 export __DistroRid="\${OSRid}-$__Arch"
95 $__ProjectRoot/run.sh build-packages -Project=$__ProjectRoot/src/.nuget/packages.builds -DistroRid=$__DistroRid -UseSharedCompilation=false -BuildNugetPackage=false $unprocessedBuildArgs
98 echo "ERROR: An error occurred while building packages; See build-packages.log for more details."
102 echo "Done building packages."