summaryrefslogtreecommitdiff
path: root/build-packages.sh
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-11-23 10:09:09 (GMT)
committerJiyoung Yun <jy910.yun@samsung.com>2016-11-23 10:09:09 (GMT)
commit4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (patch)
tree98110734c91668dfdbb126fcc0e15ddbd93738ca /build-packages.sh
parentfa45f57ed55137c75ac870356a1b8f76c84b229c (diff)
downloadcoreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.zip
coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.gz
coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.bz2
Imported Upstream version 1.1.0upstream/1.1.0
Diffstat (limited to 'build-packages.sh')
-rwxr-xr-xbuild-packages.sh73
1 files changed, 73 insertions, 0 deletions
diff --git a/build-packages.sh b/build-packages.sh
new file mode 100755
index 0000000..5e03ac2
--- /dev/null
+++ b/build-packages.sh
@@ -0,0 +1,73 @@
+#!/usr/bin/env bash
+
+usage()
+{
+ echo "Builds the NuGet packages from the binaries that were built in the Build product binaries step."
+ echo "Usage: build-packages -BuildArch -BuildType"
+ echo "arch can be x64, x86, arm, arm64 (default is x64)"
+ echo "configuration can be release, checked, debug (default is debug)"
+ echo
+ exit 1
+}
+
+__ProjectRoot="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+unprocessedBuildArgs=
+
+while :; do
+ if [ $# -le 0 ]; then
+ break
+ fi
+
+ case "$1" in
+ -\?|-h|--help)
+ usage
+ exit 1
+ ;;
+ -BuildArch=*)
+ unprocessedBuildArgs="$unprocessedBuildArgs $1"
+ __Arch=$(echo $1| cut -d'=' -f 2)
+ ;;
+ *)
+ unprocessedBuildArgs="$unprocessedBuildArgs $1"
+ esac
+ shift
+done
+
+$__ProjectRoot/run.sh build-packages -Project=$__ProjectRoot/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/Microsoft.NETCore.Runtime.CoreCLR.builds -DistroRid=\${OSRid}-$__Arch -UseSharedCompilation=false -BuildNugetPackage=false $unprocessedBuildArgs
+if [ $? -ne 0 ]
+then
+ echo "ERROR: An error occurred while building packages; See build-packages.log for more details."
+ exit 1
+fi
+
+$__ProjectRoot/run.sh build-packages -Project=$__ProjectRoot/src/.nuget/Microsoft.NETCore.Jit/Microsoft.NETCore.Jit.builds -DistroRid=\${OSRid}-$__Arch -UseSharedCompilation=false -BuildNugetPackage=false $unprocessedBuildArgs
+if [ $? -ne 0 ]
+then
+ echo "ERROR: An error occurred while building packages; See build-packages.log for more details."
+ exit 1
+fi
+
+$__ProjectRoot/run.sh build-packages -Project=$__ProjectRoot/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.builds -DistroRid=\${OSRid}-$__Arch -UseSharedCompilation=false -BuildNugetPackage=false $unprocessedBuildArgs
+if [ $? -ne 0 ]
+then
+ echo "ERROR: An error occurred while building packages; See build-packages.log for more details."
+ exit 1
+fi
+
+$__ProjectRoot/run.sh build-packages -Project=$__ProjectRoot/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.builds -DistroRid=\${OSRid}-$__Arch -UseSharedCompilation=false -BuildNugetPackage=false $unprocessedBuildArgs
+if [ $? -ne 0 ]
+then
+ echo "ERROR: An error occurred while building packages; See build-packages.log for more details."
+ exit 1
+fi
+
+# Build the TestHost package
+$__ProjectRoot/run.sh build-packages -Project=$__ProjectRoot/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.builds -DistroRid=\${OSRid}-$__Arch -UseSharedCompilation=false -BuildNugetPackage=false $unprocessedBuildArgs
+if [ $? -ne 0 ]; then
+ echo "ERROR: An error occurred while building packages, see $build_packages_log for more details."
+ exit 1
+fi
+
+echo "Done building packages."
+exit 0