Normalize the alpine and rhel RIDs
authorWes Haggard <Wes.Haggard@microsoft.com>
Tue, 24 Oct 2017 23:22:45 +0000 (16:22 -0700)
committerWes Haggard <Wes.Haggard@microsoft.com>
Mon, 30 Oct 2017 20:05:17 +0000 (13:05 -0700)
See: https://github.com/dotnet/core-setup/commit/c8a27076f93c3107759b8a86a02ea4f40d100b67

We need to strip the last part of the version number for alpine and rhel because
they are compatible and we don't want the specific versions.

build-packages.sh
build.sh

index 4821386..ed4dec9 100755 (executable)
@@ -16,7 +16,7 @@ initHostDistroRid()
     if [ "$__HostOS" == "Linux" ]; then
         if [ -e /etc/os-release ]; then
             source /etc/os-release
-            if [[ $ID == "alpine" ]]; then
+            if [[ $ID == "alpine" || $ID == "rhel"]]; then
                 # remove the last version digit
                 VERSION_ID=${VERSION_ID%.*}
             fi
index 865f0fe..ad4a6e1 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -61,7 +61,7 @@ initHostDistroRid()
     if [ "$__HostOS" == "Linux" ]; then
         if [ -e /etc/os-release ]; then
             source /etc/os-release
-            if [[ $ID == "alpine" ]]; then
+            if [[ $ID == "alpine" || $ID == "rhel"]]; then
                 # remove the last version digit
                 VERSION_ID=${VERSION_ID%.*}
             fi