summaryrefslogtreecommitdiff
path: root/build-packages.sh
diff options
context:
space:
mode:
authorsmile21prc <xiwe@microsoft.com>2017-08-17 10:42:22 -0700
committerGitHub <noreply@github.com>2017-08-17 10:42:22 -0700
commitb2b5fef27a4cb68571549f2e19660f39bd76467b (patch)
treeeb413e3bcf0b97ac2efaef54a872479da96ea4bc /build-packages.sh
parent6e01319382dff1a08412602df207a7d38ed61526 (diff)
downloadcoreclr-b2b5fef27a4cb68571549f2e19660f39bd76467b.tar.gz
coreclr-b2b5fef27a4cb68571549f2e19660f39bd76467b.tar.bz2
coreclr-b2b5fef27a4cb68571549f2e19660f39bd76467b.zip
Enable RedHat 6 in coreclr master (#13315)
* Enable RedHat 6 in coreclr master Enable RedHat 6 in coreclr master. This is identical as the approved PR to enable RedHat 6 in coreclr release/2.0.0: https://github.com/dotnet/coreclr/pull/13301 * Correct Rid to match /src/.nuget/dirs.props Correct Rid to match /src/.nuget/dirs.props * Update dockertag and add logic to detect RHEL6 in init-tools.sh Update dockertag and add logic to detect RHEL6 in init-tools.sh * Port changes from Release/2.0.0 to fix coreclr RHEL 6 official runs. Port changes from Release/2.0.0 to fix coreclr RHEL 6 official runs. * Remove empty quotes. Remove empty quotes.
Diffstat (limited to 'build-packages.sh')
-rwxr-xr-xbuild-packages.sh26
1 files changed, 24 insertions, 2 deletions
diff --git a/build-packages.sh b/build-packages.sh
index a4184646d5..9b929715e9 100755
--- a/build-packages.sh
+++ b/build-packages.sh
@@ -10,6 +10,26 @@ usage()
exit 1
}
+initHostDistroRid()
+{
+ __HostDistroRid=""
+ if [ "$__HostOS" == "Linux" ]; then
+ if [ -e /etc/os-release ]; then
+ source /etc/os-release
+ __HostDistroRid="$ID.$VERSION_ID-$__Arch"
+ elif [ -e /etc/redhat-release ]; then
+ local redhatRelease=$(</etc/redhat-release)
+ if [[ $redhatRelease == "CentOS release 6."* || $redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then
+ __HostDistroRid="rhel.6-$__Arch"
+ fi
+ fi
+ fi
+
+ if [ "$__HostDistroRid" == "" ]; then
+ echo "WARNING: Can not determine runtime id for current distro."
+ fi
+}
+
__ProjectRoot="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
__IsPortableBuild=1
@@ -70,7 +90,7 @@ while :; do
__Arch=$(echo $1| cut -d'=' -f 2)
;;
- -PortableBuild=false)
+ -portablebuild=false)
unprocessedBuildArgs="$unprocessedBuildArgs $1"
__IsPortableBuild=0
;;
@@ -88,7 +108,9 @@ if [ $__IsPortableBuild == 1 ]; then
export __DistroRid="osx-$__Arch"
fi
else
- export __DistroRid="\${OSRid}-$__Arch"
+ # init the host distro name
+ initHostDistroRid
+ export __DistroRid="$__HostDistroRid"
fi
$__ProjectRoot/run.sh build-packages -Project=$__ProjectRoot/src/.nuget/packages.builds -DistroRid=$__DistroRid -UseSharedCompilation=false -BuildNugetPackage=false $unprocessedBuildArgs