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 [-portable]"
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 "-portable - build for Portable 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)
78 unprocessedBuildArgs="$unprocessedBuildArgs $1"
83 # Portable builds target the base RID
84 if [ $__PortableBuild == 1 ]; then
85 if [ "$__BuildOS" == "Linux" ]; then
86 export __DistroRid="linux-$__Arch"
87 elif [ "$__BuildOS" == "OSX" ]; then
88 export __DistroRid="osx-$__Arch"
91 export __DistroRid="\${OSRid}-$__Arch"
94 $__ProjectRoot/run.sh build-packages -Project=$__ProjectRoot/src/.nuget/packages.builds -DistroRid=$__DistroRid -UseSharedCompilation=false -BuildNugetPackage=false $unprocessedBuildArgs
97 echo "ERROR: An error occurred while building packages; See build-packages.log for more details."
101 echo "Done building packages."